Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix 为什么MSI安装程序在更新时要求重新启动?_Wix_Windows Installer_Installation_Reboot - Fatal编程技术网

Wix 为什么MSI安装程序在更新时要求重新启动?

Wix 为什么MSI安装程序在更新时要求重新启动?,wix,windows-installer,installation,reboot,Wix,Windows Installer,Installation,Reboot,如果我们运行软件更新,我们将收到以下消息。该设置是使用WiX工具集构建的 安装程序包含一个Windows服务。在复制文件之前,但在此消息之后,服务将从安装程序中停止。最终,不需要重新启动。为什么会出现这样的信息?我们如何防止这种情况 服务声明如下: <Component Guid="xxx" Id="service"> <File Id="Service.exe" Name="Service.exe" Source="C:\xxx\prunsrv.exe"/>

如果我们运行软件更新,我们将收到以下消息。该设置是使用WiX工具集构建的

安装程序包含一个Windows服务。在复制文件之前,但在此消息之后,服务将从安装程序中停止。最终,不需要重新启动。为什么会出现这样的信息?我们如何防止这种情况

服务声明如下:

<Component Guid="xxx" Id="service">
    <File Id="Service.exe" Name="Service.exe" Source="C:\xxx\prunsrv.exe"/>
    <ServiceInstall Arguments=" foo" Description="xyz" DisplayName="foo Server" ErrorControl="normal" Id="service_install" Name="foo-server" Start="auto" Type="ownProcess"/>
    <ServiceControl Id="service_start" Name="foo-server" Remove="uninstall" Start="install" Stop="both"/>
</Component>

当它说“…文件或服务…”时,这只是一个普通的信息。这并不意味着是你的服务造成的

在记录详细日志的同时进行安装,并查找1603条消息之类的内容,这些消息涉及正在使用的文件,并查看是否可以跟踪这些文件

经常发生的情况是,Windows检查并发现它需要替换当时正在使用的一些文件。这就是为什么它说“…选择继续…”。但当它真正替换这些文件时,它发现它们不再使用,因此不需要重新启动。所以这是个时机问题

我想知道您是否抑制了FilesInUse对话框,因为Windows Installer通常会告诉您需要停止哪些进程以避免重新启动。因此,就好像您已经抑制了文件使用对话框,因此InstallValidate检测到一些正在使用的文件,并为您提供有关重新启动的一般消息。然而,当它开始替换这些文件时,可能需要很多分钟,它们已不再使用,因此可以在不重新启动的情况下进行替换


无论如何,FilesInUse注释只是猜测,没有更多信息,但是重新启动没有发生的原因是,在实际替换文件时,这些文件不再使用

我不认为我已经禁用了FilesInUse。我使用简单