已更改GUID - 现在卸载无法正常工作

时间:2012-11-07 12:21:09

标签: wix

遇到重大问题。我读到Rob M说尽可能使用Guid="*"所以我把所有的Guid改为了。现在卸载我的产品现在搞砸了。文件已成功删除,但快捷方式,服务和注册表不是。请帮忙

这是我的服务:

  <Component Id="service" Guid="*">
    <File Id="service.exe" Name="service.exe" KeyPath="yes" Source="$(var.Bin)\service.exe"/>
    <ServiceInstall Id="service.exe" Name="[PRODUCTNAME]" Description="[ProductName]" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" Arguments=" /start [ProductName]" Start="auto" Interactive="yes" Type="ownProcess" Vital="yes" ErrorControl="critical" />
    <ServiceControl Id="service.exe" Name="[PRODUCTNAME]" Stop="both" Start="install" Remove="uninstall" Wait="no"/>
  </Component>

这是卸载日志:

Service '' () could not be stopped. Verify that you have sufficient privileges to stop system services.

MSI (s) (DC:D0) [14:25:02:018]: Executing op:  ActionStart(Name=DeleteServices,Description=
Deleting services
,Template=
Service: [1]
  )
  MSI (s) (DC:D0) [14:25:02:018]: Executing op:     ProgressTotal(Total=2,Type=1,ByteEquivalent=1300000)
MSI (s) (DC:D0) [14:25:02:018]: Executing op: ServiceControl(,,Action=8,Wait=0,)
MSI (s) (DC:D0) [14:25:32:064]: Executing op: ServiceControl(,Name=OPC,Action=8,Wait=0,)


Info 1922.

Service '' () could not be deleted. Verify that you have sufficient privileges to remove system services.

它没有拿起名字,任何人都知道为什么会这样做?

3 个答案:

答案 0 :(得分:3)

首先提出问题:

  • 您是否已发布此产品的某个版本?如果是这样,更改组件GUID可能会严重违反组件规则,因此您不应在发布后更改这些规则。如果它只在你的测试机器上,那就不重要了。
  • 您是否正在重置测试计算机,以致违反组件规则不会影响卸载,或者您是否尝试在卸载失败之前执行某种升级?
  • 卸载的详细MSI日志表示什么?

答案 1 :(得分:1)

您的房产“PRODUCTNAME”是如何定义的?如果它不是常量,请确认在卸载序列期间执行初始化

答案 2 :(得分:0)

MSIZAP,将是消除安装程序安装在机器上的所有内容的最终方法。我建议你在你想要做的概念证明上进行测试,并使用VM进行所有安装测试。