簡體   English   中英

Wix安裝程序-服務無法啟動-缺少參考?

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

我有一個wix安裝程序,它要求輸入連接字符串數據,然后安裝該服務。 問題是該服務在安裝后無法啟動。

這是文件的相關代碼:

<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"/>

它在安裝過程中將完成部分工作,然后彈出經典的通用消息:“服務無法啟動,請驗證您是否具有啟動系統服務的足夠特權”。 當我較早時看到該消息時,它是由缺少引用引起的,然后我添加了這些引用。

我已經打開了詳細的錯誤日志記錄,但是看不到任何奇怪的東西-這是它的最后幾行,它揭示了一些機會:

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

我在某處看到可能歸因於管理員特權,因此添加了以下內容:

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

並且還添加到Package標簽

InstallPrivileges="elevated"

但沒有成功。

有誰比WIX經驗豐富的人知道如何調試這種事情?

更新-事件日志條目

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.

更新2-完整日志文件

這是完整日志文件的鏈接: http : //pastebin.com/FxdPZeH6

好的,事實證明我正在啟動的服務的名稱是不同的。 我在第一個實例中有空格,但在第二個實例中沒有。 所以問題是

<ServiceInstall Name="Name Of Service"

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

我已經用變量更新了。

感謝您的建議,也感謝Wix提供的有用的錯誤消息。 :)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM