Powershell Call MSI with Arguments

后端 未结 5 494
旧巷少年郎
旧巷少年郎 2020-12-07 04:09

I\'m working on a powershell script to install Autodesk products and I am having some trouble.

I\'ve tried this many different ways and keep running into errors.

5条回答
  •  误落风尘
    2020-12-07 04:34

    Any luck with storing the entire argument in a variable then passing it to start-process?

    example:

    $argument = "/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR='C:\Program Files\Autodesk\' ADSK_SETUP_EXE=1 /qb!"
    (start-process msiexec.exe -argumentlist $argument).ExitCode
    

提交回复
热议问题