Powershell Call MSI with Arguments

后端 未结 5 484
旧巷少年郎
旧巷少年郎 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:53

    This would be my recommendation for the first code snippet you provided, use single quotes inside of double quotes...

    (Start-Process "msiexec.exe" -ArgumentList "/i $dirFiles\ABDS2017\Img\x64\RVT\RVT.msi INSTALLDIR='C:\Program Files\Autodesk\' ADSK_SETUP_EXE=1 /qb!" -NoNewWindow -Wait -PassThru).ExitCode
    

    If this receives an error, you are missing an important parameter.

提交回复
热议问题