即使重新启动后,即使可执行文件消失,服务仍然存在。我使用的是 WIX 版本 3.0.5419.0
<Component Id="IdiomServer.exe" Guid="7a751e1e-5e9e-41d2-be60-dc905ab1ccad">
<File Id="IdiomServer.exe" Source="$(var.IdiomServer.TargetDir)IdiomServer.exe" KeyPath="yes" />
<ServiceInstall Id="IdiomServer_Service" Name="IdiomServer 4.0" Account="LocalSystem" Description="Idiom Repository Server" ErrorControl="normal" Start="auto" Type="ownProcess" Vital="yes" />
<ServiceControl Id="IdiomServer_Service" Name="IdiomServer 4.0" Remove="uninstall" Stop="uninstall" Wait="yes" />
</Component>
安装 Windows 服务工作正常。卸载它似乎没有任何作用。卸载日志文件的部分:
MSI (s) (D8:5C) [09:43:58:033]: Doing action: StopServices
MSI (s) (D8:5C) [09:43:58:033]: Note: 1: 2205 2: 3: ActionText
Action start 9:43:58: StopServices.
Action ended 9:43:58: StopServices. Return value 1.
MSI (s) (D8:5C) [09:43:58:033]: Doing action: DeleteServices
MSI (s) (D8:5C) [09:43:58:033]: Note: 1: 2205 2: 3: ActionText
Action start 9:43:58: DeleteServices.
Action ended 9:43:58: DeleteServices. Return value 1.
任何帮助将非常感激。
我有一个几乎相同的安装程序,运行良好。唯一的区别是我的 ServiceControl 元素与 ServiceInstall 元素具有不同的 Id,并且还有一个“Start=”install”属性。
我怀疑您的问题要么是 ServiceControl 元素的 Id,要么是您有一个杂散服务。
请尝试以下操作:
- 将 ServiceControl Id 更改为“IdiomServer_ServiceControl”
- 将两个 Service 元素中的名称更改为“Foobar”,并检查 Foobar 服务是否已安装和卸载。如果有效,您可能只需要使用“sc”命令手动删除杂散的 IdiomServer 条目。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)