Windows 服务未在主要升级 WIX 上安装 [英] Windows service not getting installed on major upgrade-WIX

查看:35
本文介绍了Windows 服务未在主要升级 WIX 上安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 msi 包 (WIX) 在机器上安装了我的服务.但是当重大升级完成后,服务会被卸载但不会被安装.

I have my service installed on the machine by an msi package(WIX). But when an major upgrade is done,service gets uninstalled but it doesnt get installed.

这是我的代码:

 <Component Id="abc" Guid="{E64A8CDD-816F-4544-9ACD-A2E367F7758A}">
              <File Id="EventTraceService.exe" Source="..\..\..\..\Products\abc.exe"  Vital="yes" KeyPath ="yes"/>
              <File Source="..\..\..\..\Products\abc.exe.config" Vital="yes" />
              <ServiceInstall
              Id="ServiceInstaller"
              Type="ownProcess"
              Vital="yes" 
              Name="abc"
              DisplayName="abc"
              Description="Monitoring and management of Trace"
              Start="auto"
              Account="LocalSystem"
              Interactive="yes"
              ErrorControl="normal"
                  />
<ServiceControl Id="StartService" Start="install" Stop="uninstall" Remove="uninstall" Name="abc" Wait="yes" />

提前致谢!

推荐答案

一种可能的解释是您更改了组件的 GUID.结果,相同的资源(的不同版本)由不同的组件管理.

One possible explanation is that you changed the GUID of the component. As a result, (the different versions of) the same resources are being managed by different components.

来自关于 当组件规则被破坏时会发生什么:

作者在两个不同的组件中包含相同的资源.

如果两个组件具有相同名称和位置的资源,并且两个组件都安装在同一文件夹中,则删除任一组件都会删除公共资源,从而损坏其余组件.

If two components have a resource under the same name and location and both components are installed into the same folder, then the removal of either component removes the common resource, which damages the remaining component.

  • 卸载任一组件都会删除资源并破坏另一个组件.
  • 组件引用计数机制已损坏.

这似乎与您的症状相符.

This seems to match your symptom.

这篇关于Windows 服务未在主要升级 WIX 上安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆