none
Installing multiple MSI's with arguments RRS feed

  • General discussion

  • 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:\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 -wait
    
    $argumentlist = "/i anyconnect-win-4.6.01103-gina-predeploy-k9.msi /qn /l*v c:\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 -wait
    
    get-childitem -path "C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile" -include *.xml -recurse | remove-item
    Copy-Item -Force "${PSScriptRoot}\*.xml" -Destination "c:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile"



    DHeinz


    • Edited by DRHeinz Tuesday, July 17, 2018 6:18 PM
    • Changed type Bill_Stewart Tuesday, December 11, 2018 9:01 PM
    • Moved by Bill_Stewart Tuesday, December 11, 2018 9:01 PM This is not third-party support forum
    Tuesday, July 17, 2018 6:17 PM

All replies

  • where are the MSI's located?
    • Edited by The Grim Tuesday, July 17, 2018 6:55 PM meh
    Tuesday, July 17, 2018 6:50 PM
  • I am testing this locally and all files are in a desktop folder. I managed to get the first msi to run by changing /l*v c:\IT\Service Desk Tools\Logs to c:\IT\  

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

    I tried adding " " around "c:\IT\Service Desk Tools\Logs" but it did not work.

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


    DHeinz

    Tuesday, July 17, 2018 7:07 PM
  • MSI installs are done be the OS.  The MSI submits the install data to the OS and dismisses.  You cannot wait on most installers.  To "stack" multiple installs you must create a special MSI that manages the multiple installs. 

    Contact the vendor of the product and see if they can assist you with this.  This is not a scripting issue.


    \_(ツ)_/

    Tuesday, July 17, 2018 7:17 PM
  • I agree with jrv - this isn't something we can help with in this forum because we don't have your MSI packages (we can't see the behavior or reproduce it) and it is likely the vendor has tools to assist with deployment.

    -- Bill Stewart [Bill_Stewart]

    Tuesday, July 17, 2018 8:34 PM