命令行“msiexec /norestart /fepmcs /qn”仍然重新启动电脑

发布于 2025-01-04 16:23:46 字数 1757 浏览 0 评论 0原文

我正在使用 WiX 为我们的产品开发安装程序。我的安装程序安装的其中一项服务需要重新启动。

在 UI 安装过程中,它会询问用户,如果用户说“否”,则不会重新启动。但是,使用静默安装,即使我指定了 /norestart 选项,它仍然会重新启动计算机。

以下是没有静默安装的情况下的日志,如果用户选择“否”,则不会重新启动:

MSI (s) (F0:58) [04:42:00:795]: Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. Reconfiguration success or error status: 0.

MSI (s) (F0:58) [04:42:00:795]: Value of RebootAction property is 
MSI (s) (F0:58) [04:42:00:795]: Windows Installer requires a system restart. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. **Type of System Restart: 2. Reason for Restart: 1.**

MSI (s) (F0:58) [04:42:00:796]: Product: MyProduct. Restart required. The installation or update for the product required a restart for all changes to take effect.  The restart was deferred to a later time.

以下是日志,即使提供了 /norestart 选项,也会发生重新启动:

MSI (s) (50:78) [04:37:06:985]: Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. Reconfiguration success or error status: 0.

MSI (s) (50:78) [04:37:06:985]: Value of RebootAction property is 
MSI (s) (50:78) [04:37:06:985]: Windows Installer requires a system restart. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. **Type of System Restart: 1. Reason for Restart: 1**.

比较两个日志文件,我注意到以下差异:

成功案例: 系统重启类型:2.重启原因:1.

失败案例: 系统重启类型:1. 重启原因:1

我是否需要在 WiX 代码中添加任何属性来处理这种情况?

I am developing an installer for our product using WiX. One of the services that my installer installs requires a reboot.

During UI installation, it asks the user, and if the user says "No", a reboot will not happen. However, using silent installation, even though I specify the /norestart option, it still reboots the machine.

Here are logs of the case without silent installation where, if the user selects "No", it doesn't restart:

MSI (s) (F0:58) [04:42:00:795]: Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. Reconfiguration success or error status: 0.

MSI (s) (F0:58) [04:42:00:795]: Value of RebootAction property is 
MSI (s) (F0:58) [04:42:00:795]: Windows Installer requires a system restart. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. **Type of System Restart: 2. Reason for Restart: 1.**

MSI (s) (F0:58) [04:42:00:796]: Product: MyProduct. Restart required. The installation or update for the product required a restart for all changes to take effect.  The restart was deferred to a later time.

Here are the logs where, even though the /norestart option is provided, a reboot happens:

MSI (s) (50:78) [04:37:06:985]: Windows Installer reconfigured the product. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. Reconfiguration success or error status: 0.

MSI (s) (50:78) [04:37:06:985]: Value of RebootAction property is 
MSI (s) (50:78) [04:37:06:985]: Windows Installer requires a system restart. Product Name: MyProduct. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyOrg. **Type of System Restart: 1. Reason for Restart: 1**.

Comparing the both log files, I noticed the following difference:

Success Case:
Type of System Restart: 2. Reason for Restart: 1.

Failure case:
Type of System Restart: 1. Reason for Restart: 1

Do I need to add any properties in WiX code to handle this scenario?

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

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

发布评论

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

评论(2

屌丝范 2025-01-11 16:23:46

尝试将 REBOOT=ReallySuppress 添加到命令行中。

Try adding REBOOT=ReallySuppress to your command line.

冷…雨湿花 2025-01-11 16:23:46

行为符合预期。

我漏掉了一点。这是在维修期间发生的。我忘记修复会忽略传递的任何命令行参数。

The behaviour was as expected.

I was missing one point. This was happening during repair. I forgot that repair ignores any command-line parameters passed.

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