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