How do I run a Windows installer and get a succeed/fail value in PowerShell?

后端 未结 4 1671
-上瘾入骨i
-上瘾入骨i 2021-02-19 19:21

I would like to install a set of applications: .NET 4, IIS 7 PowerShell snap-ins, ASP.NET MVC 3, etc. How do I get the applications to install and return a value that determines

4条回答
  •  醉酒成梦
    2021-02-19 19:31

    msi's can also be installed using msiexec.exe, msu's can be installed using wusa.exe, both have a /quiet switch, /norestart and /forcerestart switches and a /log option for logging (specify the file name).

    You can read more about the options if you call them with /?

    Note: wusa fails silently when they fail, so you have to check the log file or eventlog to determine success.

提交回复
热议问题