我尝试在 Wix 中使用以下代码。
但是在安装时,安装程序在状态下冻结了 3 分钟:正在启动服务,然后我收到此消息“服务作业服务无法启动。验证您是否有足够的权限来启动系统服务”。我的代码有什么问题吗?并且我可以要求用户在安装过程中输入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>