I am trying to install an .exe application (Win32 Cabinet Self-Extractor) silently from command line using this PowerShell command:
Start-Process -FilePath "C:\Temp\MMASetup-i386.exe" -ArgumentList "/s" -wait But everytime I get a pops up window with this error:
command line option syntax error. Type command /? for help.
What am I doing wrong? I am on Windows Server 2012R2 and using PowerShell-4.
91 Answer
MMASetup-i386 uses the /Q for quiet install, not /s.
Start-Process -FilePath "C:\Temp\MMASetup-i386.exe" -ArgumentList "/Q" -wait
You can often find the valid arguments for an .exe by running it with the /? argument, such as:
MMASetup-i386.exe /?
However, that is not always the case and sometimes you may need to consult the documentation or search the developer's website or the Internet in general for it.
12