Wix burn 不停止并删除服务
Wix burn does not stop and remove service
我有使用 burn 创建的引导程序安装程序,其中包含 4 个 msi,其中安装了 3 个(取决于 OS)。
其中一个安装程序安装服务并运行它。如果我只使用这个进行卸载,该服务将被停止并从服务列表中删除。但是,如果我使用引导程序安装程序进行卸载,服务将保留在列表中并显示为 运行(即使所有文件都已删除并且服务实际上不是 运行)。
有谁知道从 msi 卸载和从 exe 引导程序(打包了相同的 msi)卸载之间可能有什么区别?
服务安装:
<Component Id="ComponentId" Guid="someguid-4C46-832F-B3E7E063713A">
<File Id="ExeFile" Checksum="yes" KeyPath="yes" Source="service.exe" />
<ServiceInstall DisplayName="[ProductName]"
Name="myservice"
Id="ServiceInstall"
Start="auto"
ErrorControl="normal"
Type="ownProcess"
Account="[ACCOUNTUSER]"
Password="[ACCOUNTPASSWORD]" />
<ServiceControl Id="ServiceControl"
Name="myservice"
Remove="uninstall"
Wait="yes"
Start="install"
Stop="both" />
</Component>
引导程序:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="MyBundle" Version="1.0.0.0" Manufacturer="Me" UpgradeCode="someguid-40da-bda2-1e46a5a55c47">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="" SuppressOptionsUI="yes" LogoFile="logo.bmp" SuppressRepair="yes" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage
Id="App1"
SourceFile="App1_x86.msi"
InstallCondition="NOT VersionNT64"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage
Id="App1"
SourceFile="App1_x64.msi"
InstallCondition="VersionNT64"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage
Id="App2"
SourceFile="App2.msi"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage Id="Service"
SourceFile="Service.msi"
DisplayInternalUI="yes"
Permanent="no" />
</Chain>
</Bundle>
</Wix>
我已经弄明白了,卸载 App2 时可能会杀死所有 运行 个实例。我已经通过更改最后两个安装包的顺序解决了这个问题,现在它可以很好地删除产品,包括停止和删除服务。
我有使用 burn 创建的引导程序安装程序,其中包含 4 个 msi,其中安装了 3 个(取决于 OS)。
其中一个安装程序安装服务并运行它。如果我只使用这个进行卸载,该服务将被停止并从服务列表中删除。但是,如果我使用引导程序安装程序进行卸载,服务将保留在列表中并显示为 运行(即使所有文件都已删除并且服务实际上不是 运行)。
有谁知道从 msi 卸载和从 exe 引导程序(打包了相同的 msi)卸载之间可能有什么区别?
服务安装:
<Component Id="ComponentId" Guid="someguid-4C46-832F-B3E7E063713A">
<File Id="ExeFile" Checksum="yes" KeyPath="yes" Source="service.exe" />
<ServiceInstall DisplayName="[ProductName]"
Name="myservice"
Id="ServiceInstall"
Start="auto"
ErrorControl="normal"
Type="ownProcess"
Account="[ACCOUNTUSER]"
Password="[ACCOUNTPASSWORD]" />
<ServiceControl Id="ServiceControl"
Name="myservice"
Remove="uninstall"
Wait="yes"
Start="install"
Stop="both" />
</Component>
引导程序:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="MyBundle" Version="1.0.0.0" Manufacturer="Me" UpgradeCode="someguid-40da-bda2-1e46a5a55c47">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="" SuppressOptionsUI="yes" LogoFile="logo.bmp" SuppressRepair="yes" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage
Id="App1"
SourceFile="App1_x86.msi"
InstallCondition="NOT VersionNT64"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage
Id="App1"
SourceFile="App1_x64.msi"
InstallCondition="VersionNT64"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage
Id="App2"
SourceFile="App2.msi"
DisplayInternalUI="yes"
Permanent="no" />
<MsiPackage Id="Service"
SourceFile="Service.msi"
DisplayInternalUI="yes"
Permanent="no" />
</Chain>
</Bundle>
</Wix>
我已经弄明白了,卸载 App2 时可能会杀死所有 运行 个实例。我已经通过更改最后两个安装包的顺序解决了这个问题,现在它可以很好地删除产品,包括停止和删除服务。