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

后端 未结 4 1585
-上瘾入骨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:38

    Depends. MSIs can be installed using WMI. For exes and other methods, you can use Start-Process and check the Process ExitCode.

提交回复
热议问题