Powershell Call MSI with Arguments

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

    In order to understand how to "quote" the parameters for start-process here is a sample of code to start the unattended installation of vmtools

    the command i wanted to run in a powershell:

    setup.exe  /l /v"/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs,Unity,BootCamp,SVGA"
    

    The powershell sample:

    Start-Process -FilePath "$vmtoolspath\setup.exe" -ArgumentList "/l /v ""/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs,Unity,BootCamp,SVGA"" " -Wait
    

提交回复
热议问题