我尝试在 Wix 中使用下面的代码。
但是在安装时,安装程序在“正在启动服务”状态下冻结了大约 3 分钟,然后我收到此消息“Service Jobservice 无法启动。请验证您是否有足够的权限来启动系统服务”。
我的代码有什么错误吗?并且可以要求用户在安装时输入windows系统用户名和密码来获得“权限”吗?
多谢!
<File Id='JobServiceEXE' Name='JobService.exe' DiskId='1'
Source='JobService.exe' Vital='yes' KeyPath='yes'/>
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes"
Name="JobService" DisplayName="123 Co. JobService"
Description="Monitoring and management Jobs" Start="auto"
Account="LocalSystem" ErrorControl="ignore" Interactive="no" />
<ServiceControl Id="StartService" Stop="both" Remove="uninstall"
Name="JobService" Wait="yes" />
</Component>
以下代码对我有用...不需要提示输入用户名/密码:)
<File Id='JobServiceEXE' Name='JobService.exe' DiskId='1' Source='JobService.exe' KeyPath='yes'/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Name="JobService"
DisplayName="123 Co. JobService"
Description="Monitoring and management Jobs"
Start="auto"
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]"
ErrorControl="normal"
/>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="JobService" Wait="yes" />
</Component>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)