【问题标题】:Command-line 'msiexec /norestart /fepmcs /qn' still reboots the PC命令行“msiexec /norestart /fepmcs /qn”仍会重新启动 PC
【发布时间】:2012-02-13 13:11:29
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      行为符合预期。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-10-15
        • 1970-01-01
        • 1970-01-01
        • 2018-04-26
        • 1970-01-01
        相关资源
        最近更新 更多