Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Command Line installs for Windows 8

I am testing my product to ensure it installs on Windows 8 correctly, and I am running into a strange issue.

When doing a command line install for other windows products, the following command works perfectly:

setup.exe /v"INSTALLDIR=\"C:/program files (x86)/ProductName\" /lv log1.txt"

However, in Windows 8 power shell, I get the following error:

The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.

Has windows 8 changed msiexec? How does one quote paths to INSTALLDIR with Windows 8?
Labels (1)
0 Kudos
(3) Replies
Level 12 Flexeran
Level 12 Flexeran

I expect that PowerShell has different quoting mechanisms for command lines. Have you tried running this in cmd.exe instead?
0 Kudos
Level 5

CMD.exe works normally.

My concern is that my users will want to do the install via the powershell. Seems to me the kind of user that wants to do the command line install functionality would want to use the power shell; And it seems really strange that quoted paths to MSI don't work.
0 Kudos
Level 9

As far as I know, in PowerShell the escape character is ` instead of \ so this might work:
setup.exe /v"INSTALLDIR=`"C:\program files (x86)\ProductName`" /lv log1.txt"
Note that I also changed the forward slashes in the path to backslashes.
Stefan Krueger
0 Kudos