在Windows 2012上使用Wix Installer时无法停止Windows服务

时间:2013-12-04 03:50:08

标签: windows-services wix windows-installer windows-server-2012 wix3.7

我有一个MSI可以停止正在运行的服务并使用Wix 3.7升级它。在Windows 2012上,我在安装过程中随机出错。

这只会在服务运行时发生,这让我相信它与停止有关。当发生故障并且我重试时,安装会100%的时间运行。此外,我在2012年的胜利中才看到这一点。我还未能在2008年的胜利中重演这一点。

这是代码

<ServiceInstall Id="MyServiceInstall" DisplayName="My Service" Description="My Service"     Name="MyService" ErrorControl="normal" Start="auto" Type="ownProcess" Vital="yes">
<ServiceConfig Id="MyServiceConfig" DelayedAutoStart="yes" OnInstall="yes"     OnReinstall="yes" PreShutdownDelay="240000"/>
</ServiceInstall>
<ServiceControl Id="MyServiceControl" Name="MyService" Stop="uninstall"     Remove="uninstall" Wait="yes"/>

有时msi日志中的错误是:

MSI (s) (BC:FC) [00:54:18:223]: Executing op:  ServiceInstall(Name=MyService,DisplayName=My Service,ImagePath="c:\Program Files\MyCompany\My  Service\myservice.exe",ServiceType=16,StartType=2,ErrorControl=32769,,Dependencies= [~],,,Password=**********,Description=My Service,,)
MSI (s) (BC:FC) [00:54:18:224]: Note: 1: 2205 2:  3: Error 
MSI (s) (BC:FC) [00:54:18:224]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM   `Error` WHERE `Error` = 1923 
MSI (c) (78:2C) [00:54:18:230]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS  Shell Dlg, Ret=MS Shell Dlg

Error 1923. Service 'My Service' (MyService) could not be installed.  Verify that you   have sufficient privileges to install system services.
MSI (s) (BC:FC) [00:54:24:339]: Note: 1: 2205 2:  3: Error 
MSI (s) (BC:FC) [00:54:24:339]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM  `Error` WHERE `Error` = 1709 
MSI (s) (BC:FC) [00:54:24:339]: Product: My Service -- Error 1923. Service 'My Service'   (MyService) could not be installed.  Verify that you have sufficient privileges to install  system services.

有时我得到这个:

MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 5784 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 6784 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 3652 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 4804 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 7000 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: I/O on thread 5080 could not be cancelled. Error: 1168
MSI (s) (6C:D8) [19:35:30:922]: Note: 1: 2205 2:  3: Error 
MSI (s) (6C:D8) [19:35:30:922]: Note: 1: 2228 2:  3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 

关于如何解决这个问题的任何想法?

0 个答案:

没有答案
相关问题