Bri*_*ian 9 service wix upgrade wix3.7
我正在尝试阻止我的服务在我的WiX安装程序中的主要升级中丢失其设置(凭据和其他选项).我按照这里的建议,我正在尝试使用
<InstallExecuteSequence>
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)
但我的服务仍在重新升级,在每次升级时丢失我的凭据和其他服务设置.
在日志中,看起来我的状况只被尊重一次.我知道了
MSI (s) (6C:E8) [16:52:53:944]: Skipping action: DeleteServices (condition is false)
Run Code Online (Sandbox Code Playgroud)
然后几百行后,我明白了
MSI (s) (6C:A4) [16:52:54:873]: Doing action: DeleteServices
Run Code Online (Sandbox Code Playgroud)
所以在我看来,第二个DeleteServices是我的问题.任何人都可以告诉我如何压制第二个,或者我正在做什么导致它?
我正在使用WiX工具集3.7.这是我的代码,显然删除了guid.
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id='*' Name='My Product' Language='1033'
Version='1.0.6' Manufacturer='Me' UpgradeCode='PUT-GUID-HERE' >
<Package Description='My Product' Platform='x86' Id='*'
Manufacturer='Me' InstallerVersion='200' Compressed='yes' />
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<InstallExecuteSequence>
<DeleteServices>NOT UPGRADINGPRODUCTCODE</DeleteServices>
</InstallExecuteSequence>
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='AgentDir' Name='Agent'>
<Component Id='Binaries' Guid='PUT-GUID-HERE' Win64='no'>
<File Id='AgentExe' Source='../MyProduct/MyExe.exe' KeyPath='yes' ProcessorArchitecture='x86' />
<ServiceInstall Id="TheServiceInstall" Description="[ProductName]" EraseDescription="no" DisplayName="[ProductName]" ErrorControl="normal" Interactive="no" Name="[ProductName]" Start="auto" Type="ownProcess" Vital="yes">
</ServiceInstall>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='CompleteInstall' Title='My Product' Level='1'>
<ComponentRef Id='Binaries' />
</Feature>
</Product>
</Wix>
Run Code Online (Sandbox Code Playgroud)
谢谢!
似乎我的问题不是服务被删除,而是新产品的安装导致我丢失了我的服务设置.
我将它添加到我的InstallExecuteSequence块中,它似乎已经完成了这个技巧
<InstallServices>NOT WIX_UPGRADE_DETECTED</InstallServices>
Run Code Online (Sandbox Code Playgroud)
谢谢Stephen的帮助!
| 归档时间: |
|
| 查看次数: |
1725 次 |
| 最近记录: |