我正在使用 wix 创建一个安装程序,它正在挂起 StartServices 操作。这是我要安装的唯一服务:
<Component Id="CMP_RemindexNP.exe" Guid="{3FB99890-752D-4652-9412-72230695A520}">
<File Id="FILE_INSTALLFOLDER_RemindexNPEXE" Source="RemindexNP.exe" KeyPath="yes"/>
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\RemindexNP\Parameters">
<RegistryValue Id="rg_remNP1" Action="write" Name="AppDirectory" Value="[INSTALLFOLDER]" Type="string"/>
<RegistryValue Id="rg_remNP2" Action="write" Name="Application" Value="[INSTALLFOLDER]RemindexNP.exe" Type="string"/>
</RegistryKey>
<ServiceInstall DisplayName="RemindexNP" Id="srv_remNP" Name="RemindexNP" Start="auto" Type="shareProcess" ErrorControl="ignore"/>
<ServiceControl Id="srvc_remNP" Name="RemindexNP" Remove="both" Start="install" Stop="uninstall" Wait="no"/>
</Component>
这是日志文件中的 StartService 操作:
Action 17:15:08: StartServices. Starting services
Action start 17:15:08: StartServices.
StartServices: Service: Starting services
Action ended 17:15:08: StartServices. Return value 1.
如果我等待 5 - 10 分钟,安装程序会“提前结束”。或者我可以在任务管理器中停止任务,几分钟后,我会得到相同的对话框。
我尝试将 ServiceInstall 中的 Type 属性设置为 shareProcess 和 ownProcess,这两个都不起作用。我也尝试将 Wait 设置为 no 和 yes。
我的 ServiceInstall 元素有问题吗?