简体   繁体   English

Wix安装程序-服务无法启动-缺少参考?

[英]Wix installer - service not starting - missing references?

I've got a wix installer that requests input of connection string data, then installs the service. 我有一个wix安装程序,它要求输入连接字符串数据,然后安装该服务。 The problem is that the service fails to start after install. 问题是该服务在安装后无法启动。

Here is the relevant code for the files: 这是文件的相关代码:

<File  Id="EmailQueueProcessorExe" DiskId="1" Name="$(var.EmailQueueProcessor.TargetFileName)" Vital="yes" Source="$(var.EmailQueueProcessor.TargetPath)" KeyPath="yes" />
<File Id="EmailQueueProcessorConfig" Name="$(var.EmailQueueProcessor.TargetFileName).config" KeyPath="no" Source="$(var.EmailQueueProcessor.TargetPath).config"/>

What it does on install is get part way through then bring up the classic generic message: "Service failed to start, verify you have sufficient privileges to start system services". 它在安装过程中将完成部分工作,然后弹出经典的通用消息:“服务无法启动,请验证您是否具有启动系统服务的足够特权”。 When I came across that message earlier, it was caused by missing references, which I then added in. 当我较早时看到该消息时,它是由缺少引用引起的,然后我添加了这些引用。

I've got verbose error logging turned on, but can't see anything odd - here are the last few lines of it on the off-chance it sheds some light: 我已经打开了详细的错误日志记录,但是看不到任何奇怪的东西-这是它的最后几行,它揭示了一些机会:

MSI (s) (50:08) [16:02:05:851]: Running as a service.
MSI (s) (50:08) [16:02:05:852]: Hello, I'm your 32bit Elevated custom action server.
MSI (s) (50:50) [16:02:05:896]: Executing op: ActionStart(Name=InstallServices,Description=Installing new services,Template=Service: [2])
Action 16:02:05: InstallServices. Installing new services
MSI (s) (50:50) [16:02:05:897]: Executing op: ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000)
MSI (s) (50:50) [16:02:05:897]: Executing op: ServiceInstall(Name=Email Queue Processor Service,DisplayName=Email Queue Processor Service,ImagePath="C:\Program Files (x86)\My Company\Email Queue\EmailQueueProcessor.exe",ServiceType=16,StartType=2,ErrorControl=32769,,Dependencies=[~],,StartName=NT AUTHORITY\LocalService,Password=**********,Description=Program to install Email Queue service,,)
InstallServices: Service: 
MSI (s) (50:50) [16:02:06:000]: Executing op: ActionStart(Name=StartServices,Description=Starting services,Template=Service: [1])
Action 16:02:06: StartServices. Starting services
MSI (s) (50:50) [16:02:06:003]: Executing op: ProgressTotal(Total=1,Type=1,ByteEquivalent=1300000)
MSI (s) (50:50) [16:02:06:003]: Executing op: ServiceControl(,Name=EmailQueueProcessorService,Action=1,Wait=0,)
StartServices: Service: EmailQueueProcessorService

I saw somewhere that it could be down to administrator privileges, so I added the following: 我在某处看到可能归因于管理员特权,因此添加了以下内容:

<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

and also added to the Package tag 并且还添加到Package标签

InstallPrivileges="elevated"

but without success. 但没有成功。

Anyone a bit more experienced than me with WIX who knows how to debug this kind of thing? 有谁比WIX经验丰富的人知道如何调试这种事情?

UPDATE - EVENT LOG ENTRIES 更新-事件日志条目

Product: EmailQueueProcessorInstaller -- Installation failed.

Windows Installer installed the product. Product Name: EmailQueueProcessorInstaller. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: My Company. Installation success or error status: 1603.

UPDATE 2 - FULL LOG FILE 更新2-完整日志文件

Here is a link to the full log file: http://pastebin.com/FxdPZeH6 这是完整日志文件的链接: http : //pastebin.com/FxdPZeH6

Ok, it turned out that the name of the service I was starting was different. 好的,事实证明我正在启动的服务的名称是不同的。 I had spaces in the first instance but not in the next. 我在第一个实例中有空格,但在第二个实例中没有。 So the problem was 所以问题是

<ServiceInstall Name="Name Of Service" and <ServiceInstall Name="Name Of Service"

<ServiceControl Id="StartWindowsService" Name="NameOfService" . <ServiceControl Id="StartWindowsService" Name="NameOfService"

Ive updated now with variables. 我已经用变量更新了。

Thanks for your suggestions, and thanks to Wix for your ever helpful error messages. 感谢您的建议,也感谢Wix提供的有用的错误消息。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM