This project is read-only.

How to run exe with multiple arguments

Topics: Archive - Deployment Scripts
Mar 4, 2015 at 5:09 PM
I am trying to run an executable that use /s /v "/qn" as the switches for a silent install. I have tried:
Execute-Process -FilePath "MCRInstaller.exe" -Arguments "/s /v '"/qn"'"

This gives an error looking for the window type. Does anyone know a way to make this work?

Thanks in advance!!
Mar 5, 2015 at 12:24 PM
This is a script sample:
set-variable -name Var_Prog1 -visibility public -Scope Script `
        -Value "Execute-MSI -Action Install -Path `"$($Var_SourceFiles)\ActivePerl-`" -Parameters `"REBOOT=ReallySuppress DISABLEADVTSHORTCUTS=1 ALLUSERS=1 /Qn`" -LogName `"$var_PackageLongName`""
You will notice, I espaced characters requiring ".

And then:
invoke-expression $Var_Prog1