如何使用powershell静默安装exe

Neh*_*eha 5 powershell silent-installer domino-designer-eclipse

我正在尝试使用 Powershell 命令安装试用版 Lotus Notes Designer

Start-Process -FilePath "EXEPath" -Verb runAs -ArgumentList "/qn"
Run Code Online (Sandbox Code Playgroud)

但是这个命令显示的是正常的安装向导,我如何使它成为静默安装?

Jam*_* C. 6

静默安装命令因程序本身和它们使用的安装程序而异。使用/qn适用于大多数(但不是全部!)MSI 安装程序,因为大多数人都会遵循 Microsoft 标准,但 EXE 安装程序可能非常不同,因为它们没有像 MSI 这样的指导方针。

搜索程序名称和“静默安装”可能会显示程序帮助页面或博客,其中列出了您需要使用的命令。

搜索“lotus notes 设计器静默安装”会出现这篇文章,其中列出了以下命令:

setup.exe /s /v"/qn"
Run Code Online (Sandbox Code Playgroud)

你会像这样使用:

Start-Process -FilePath "C:\folder\setup.exe" -Verb runAs -ArgumentList '/s','/v"/qn"'
Run Code Online (Sandbox Code Playgroud)

注意:我无法测试这个,因为我不使用 Lotus Notes,但它应该可以工作,或者至少让您知道该怎么做。

  • @GaurangDave 仅仅因为我对 **this question** 的回答不适用于**你的问题** 并不是拒绝投票的理由。 (3认同)

Jit*_*tra 5

请在 powershell 中尝试以下命令,它将与等待和输出一起静默安装。注意:您的安装程序应该支持 /S 选项并且没有尝试使用 LotusNotes。

Start-Process .\installer.exe /S -NoNewWindow -Wait -PassThru
Run Code Online (Sandbox Code Playgroud)