Silently install Apache through Advanced Installer - apache

I am trying to silently install apache using Advanced Installer 8.9, but it is still prompting me for user interaction even though I pass the command parameters in the Silent (No UI) field.
msiexec /i "httpd-2.2.22-win32-x86-no_ssl.msi" /qn /passive ALLUSERS=1 SERVERADMIN=admin#localhost SERVERNAME=localhost SERVERDOMAIN=localhost SERVERPORT=80
What can I do to solve this?

The parameters set in "Silent (No UI)" field are used by the prerequisite only if the bootstrapper is running with silent UI. If you want these parameters to be used for all the UI levels of the bootstrapper you need to set the same command line in all fields, i.e. Full UI, Basic UI and Silent (No UI).

Agree with #bogdan. Also, I noticed that you pass the entire msiexec command into the parameters. If you have specified apache as a prerequisite, you only need to pass the arguments of msiexec in the command parameters, e.g. /qn, /passive etc. You shouldn't pass "msiexec" as command line parameters.

Related

Microsoft Installer command line string parameter not working?

So I am trying to run a quite installation, with my msi, and it seems like I can easily pass a number for a parameter that I have, but I can't seem to pass in a string...I tried using single quotes ' and double quotes "
msiexec /i 'My Installer.msi' /quiet JREPATH="c:\\BLA BLA"
This and also the single quotes return this :
Now according to this article : https://learn.microsoft.com/en-us/windows/desktop/msi/command-line-options
it should work...
Property values that are literal strings must be enclosed in quotation
marks. Include any white spaces in the string between the marks.
msiexec /i A:\Example.msi PROPERTY="Embedded White Space"
There is no problem with the MSI, I assume this because if i pass a number..it works...
msiexec /i 'My Installer.msi' /quiet JREPATH=3
LATER EDIT:
It seems that the problem appears when I have a space in the value of the parameter..for example something like the example below works :
msiexec /i "WKFS ReportGenerator.msi" /quiet JREPATH="c:\\;;BLA"
This however doesn't:
msiexec /i "WKFS ReportGenerator.msi" /quiet JREPATH="c:\\;;BLA a"
LATER EDIT 2:
These commands including spaces in the value work if using a simple cmd instead of PowerShell..
If you invoke from Powershell, you should use the call operator & This should then also work with parameters enclosed in quotes:
& msiexec /i `"My Installer.msi`" /quiet JREPATH=`"c:\BLA BLA`"
UPDATE: Since this was related to PowerShell. See Windows Installer PowerShell Module on github.com (scroll down for description, use releases tab for download). I haven't really tested it much, but it is from Heath
Stewart - Microsoft Senior Software Engineer (github).
Brief, inline sample:
install-msiproduct .\example.msi -destination (join-path $env:ProgramFiles Example)
How can I use powershell to run through an installer?
Get the Windows Installer PowerShell Module easier with WMF 5.0
The below was written before I realized that this was related to PowerShell.
Quick Suggestion: Maybe try this command line:
msiexec.exe /i c:\setup.msi /QN /L*V "C:\Temp\msilog.log" JREPATH="c:\MyPath"
Get rid of the double \\ in the path you specify (could be enough), and use the old style /QN switch instead of the /quiet switch. Some elaboration and details below.
Silent Installation: What installer is this? Is it a vendor package? Some sort of Java application I presume? This is how to install a normal MSI file silently:
msiexec.exe /i c:\setup.msi /QN /L*V "C:\Temp\msilog.log"
Quick explanation:
/L*V "C:\Temp\msilog.log"= verbose logging
/QN = run completely silently
/i = run install sequence
msiexec.exe: There are two types of switches for msiexec.exe - the old fashioned ones such as /QN (Command-Line Options) for silent installation which matches the newer /quiet that you are using (Standard Installer Command-Line Options).
To add properties you do as you have already done, add it to the command line:
msiexec.exe /i myinstaller.msi ADDLOCAL="Program,Dictionaries" SERIALKEY="1234-1234" /qn
Some Further Links:
How to make better use of MSI files (On how to deploy MSI files silently with or without transforms applied. First section only. The last section goes into a lot of details on other topics)
Batch script to install MSI (similar answer)

WiX bootstrapper silent install with custom /a argument

Is it possible to initiate a silent installation of a WiX bundle through the use of a command line argument in the format of /a or /arg?
I'm aware of the available command line arguments accepted by the wixstdba bootstrapper.
Specifically, we need to do this using the argument /s /v/qn argument.
NB: Executing the bootsrapper with the command line setup.exe /s /v/qn actually does initiate a silent install, and I assume this is because the BA interprets the /s as equivalent to -s. But since I can't find this behaviour documented anywhere, I am nervous about relying upon it, and would prefer an explicit method for doing this.
TL;DR
The reason we would like to support this argument /format is due to the automatic upgrade operation of a previous version of the software. This version of the software launched an automatically downloaded upgrade to itself, which was an InstallShield package, with the switches /s /v/qn to launch the MSI as a silent installation. Those switches are coded into a constant field, so the fact that we are moving from InstallShield to WiX presents this problem.
We would like to replicate this functionality but need a way to translate this set of arguments to either a -silent or -passive argument, or find some other method to accomplish this task.
Burn supports both - and / as switch characters. Silent UI mode is supported as q, quiet, s, and silent with leading - and /. See the code at https://github.com/wixtoolset/wix3/blob/develop/src/burn/engine/core.cpp#L1098.

how to create installation log file in Target folder in wix

i am using the following command to see the logs in wix installer.
msiexec /i "D:\WixProjects\DFServicesWixSetup\DFServices\bin\Debug\DFServices.msi" /L*V "D:\DFServices.log"
but this command is trying to install the msi again.
I want to execute this command from wix after finishing the installation and log file need to save in installed folder.
can any one help me on this.
You need to decide in advance if you want Windows Installer to make a log file. You also need to decide in advance where it should go. If you want it to end up in the install folder then you either need to copy it there after installation or specify the install folder in advance, too.
In Windows Installer folders are controlled by properties. You can specify such properties in the command that starts installation. The name of the property for the "install folder" depends on how the installer authoring; INSTALLFOLDER is one typical name.
So, you could do this with a command like this:
msiexec /i "D:\WixProjects\DFServicesWixSetup\DFServices\bin\Debug\DFServices.msi" /L*V "D:\path\DFServices.log" /qb INSTALLFOLDER="D:\path"
The /qb switch is reduce the UI such that the user is offered the chance to change the installer folder. It may more may not be need for your installer, depending on what dialogs its UI normally shows.
So, the first step is to figure out which property sets the install folder in your installer.

msiexec: Default to "do not close application" in silent mode

I want to install my program with a quiet msiexec command such as:
msiexec /i file.msi /qn
However, if the application happen to be running, it will default to closing the application. I want msiexec to default to never close the application, but instead install on next reboot.
Is this possible as a command line option or through how the msi is built in wix?
Edit: I am installing a service btw
Take a look at the REBOOT property.
You probably want to add REBOOT=R.

What is the best way to specify whether InstallPrivileges is limited or elevated at the command line in WIX?

I want to create an MSI in WiX such that it can take a command line parameter to indicate whether it is a per-machine or per-user installation and consequently whether to raise a UAC dialog.
What is the best way to accomplish this?
This is the link for per-machine/per-user from MSDN.
so to change the values from the command line parameter, you'll need something like so:
msiexec /i myinstaller.msi ALLUSERS=[1|2]
Also, have a look at this link from wix-users
The UAC dialog is controlled by a bit in the SummaryInformation stream. That, unfortunately, means it cannot be controlled at "run time" (install/repair/uninstall). You have to build different MSI files to truly change the UAC prompt.
I haven't been able to test in Vista yet, but what works in XP for limited user per user install and admin user per machine install is the following:
msiexec /i myinstaller.msi ALLUSERS="" INSTALLDIR="C:\Documents and Settings[Username]\Local Settings\Application Data\My COmpany\My Program"
The INSTALLDIR can be anything that a limited user can write to. The above is the directory Google Chrome uses. Found from the following link that the ALLUSERS property can actually be blank which is distint from 1 or 2 and that correctly sets the ProgramDir and Desktop locations
http://blogs.msdn.com/astebner/archive/2007/11/18/6385121.aspx