我正在尝试使用WIX安装windows服务。 Windows服务安装罚款,如果我检查服务经理,我能看到已安装我的服务内,尝试启动,如下图所示:WIX安装windows服务
后3〜4分钟,我得到错误需要足够的特权。请参阅图像错误消息:
如果我运行Windows服务设置手动那么它在启动时没有任何问题,安装的罚款。我做错了什么人都可以帮忙?
以下是我使用的代码:
public ProjectInstaller()
{this.ServiceProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller();
this.ServiceInstaller = new System.ServiceProcess.ServiceInstaller();
//
// ServiceProcessInstaller
//
this.ServiceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalService;
this.ServiceProcessInstaller.Password = null;
this.ServiceProcessInstaller.Username = null;
//
// ServiceInstaller
//
this.ServiceInstaller.ServiceName = "Service";
this.ServiceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
}
以下是我的维克斯代码:
<File Id='SetupService' Name='SetupService' DiskId='1' Source='setup.exe' KeyPath='yes'/>
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Name="SetupService" DisplayName="DataLogsetup" Description="Service" Start="auto" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" ErrorControl="normal"/>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="SetupService" Wait="yes" />
我也试图在[本地服务]通过在帐户,但我仍然我得到了同样的错误。无论如何,我可以使用WIX安装我的服务吗?
:谢谢您的答复。我可以安装该服务。我在product.wxs中做了一些更改。在工作之下提供。 – reapen