/build/static/layout/Breadcrumb_cap_w.png

Installing multiple MSI's with arguments

I am trying to install two msi files but when I run the arguments fail. Additionally, I need to have the application -wait before installing the second application. I cannot seem to figure this one out.

$argumentlist = "/i anyconnect-win-4.6.01103-core-vpn-predeploy-k9.msi /qn /l*v C:\IT\Service Desk Tools\Logs\AnyConnect-K9.log"

$application = "anyconnect-win-4.6.01103-core-vpn-predeploy-k9.MSI"

$argumentlist = $argumentlist.Replace("anyconnect-win-4.6.01103-core-vpn-predeploy-k9.msi",$application)

Start-Process -FilePath "$env:systemroot\system32\msiexec.exe" -ArgumentList $argumentlist


$argumentlist = "/i anyconnect-win-4.6.01103-gina-predeploy-k9.msi /qn /l*v C:\IT\Service Desk Tools\Logs\AnyConnect-Gina.log"

$application = "anyconnect-win-4.6.01103-gina-predeploy-k9.MSI"

$argumentlist = $argumentlist.Replace("anyconnect-win-4.6.01103-gina-predeploy-k9",$application)

Start-Process -FilePath "$env:systemroot\system32\msiexec.exe" -ArgumentList $argumentlist


0 Comments   [ + ] Show comments

Answers (1)

Posted by: captain_planet 5 years ago
Black Belt
0
- I'm not sure what the 'replace' line is for?
- You probably need to use Start-Process with -Wait
- Be careful of spaces in paths
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ