如何使用 WiX 和 MSI 进行静默安装和卸载?

发布于 2024-09-03 03:27:01 字数 60 浏览 1 评论 0原文

如何在 WiX 中创建一个静默安装程序,不向用户显示任何 UI 对话框并使用默认设置进行安装、升级和卸载?

How can a silent installer be created in WiX that does not display any UI dialogs to the user and installs, upgrades and uninstalls with default settings?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

温折酒 2024-09-10 03:27:01

Windows Installer (MSI) 使用以下命令行参数进行静默操作:

静默安装或静默主要升级:

msiexec.exe /i foo.msi /qn

静默小升级:

msiexec.exe /i foo.msi REINSTALL=ALL REINSTALLMODE=vomus /qn

静默卸载:

msiexec.exe /x foo.msi /qn

可执行路径:

C:\Windows\system32\msiexec.exe

Windows Installer (MSI) uses the following command line arguments to be silent:

Silent install or silent major upgrade:

msiexec.exe /i foo.msi /qn

Silent minor upgrade:

msiexec.exe /i foo.msi REINSTALL=ALL REINSTALLMODE=vomus /qn

Silent uninstall:

msiexec.exe /x foo.msi /qn

Executable path:

C:\Windows\system32\msiexec.exe
往事随风而去 2024-09-10 03:27:01

使用 WiX 创建的安装程序 .exe 可以从命令行运行,无需用户输入,只需使用以下命令行参数之一:

  • /quiet - 不显示任何 UI
  • /passive - 显示 UI 但不需要用户输入。本质上只是显示安装进度条

这个答案基于 WiX 3.9。

Installer .exe's created with WiX can be run from the command line without requiring user input by using one of these command line parameters:

  • /quiet - Displays no UI whatsoever
  • /passive - Displays a UI but requires no user input. Essentially just displays an install progress bar

This answer is based on WiX 3.9.

孤蝉 2024-09-10 03:27:01

所有 MSI 安装程序(无论是否由 WiX 创建)都可以通过命令行参数进行控制。因此,您可以制作带有 UI 的安装程序,并且仍然以静默方式安装它,无需从安装程序中删除 UI,只需在命令行上抑制它即可。请记住,请确保在第一个安装程序中添加升级元素,以便后续安装程序能够匹配

All MSI installers whether created by WiX or not can be controlled via command line arguments. So you can make an installer with UI and still install it silently, there is no need to remove the UI from the installer just suppress it on the command line. Remember, make sure you add the upgrade element in your first installer so subsequent ones will match

二智少女猫性小仙女 2024-09-10 03:27:01

只要不包含任何 UI/UIRef 元素,那么就不会包含任何 UI :)

Just don't include any UI/UIRef elements and then no UI will be included :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文