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://docs.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:
The below was written before I realized that this was related to PowerShell.
Quick Suggestion: Maybe try this command line:
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
:Quick explanation:
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:
Some Further Links: