命令行'msiexec / norestart / fepmcs / qn'仍然重新启动PC

时间:2012-02-13 13:11:30

标签: wix windows-installer wix3.5 wix3.6

我正在使用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代码中添加任何属性来处理这种情况?

2 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:1)

行为与预期一致。

我错过了一点。这是在修理期间发生的。我忘了修复忽略了传递的任何命令行参数。