我目前正在为我们的“AwesomeApp”创建一个设置,我将在下面将其称为“MSI”。我在这里遇到的问题是:
我的MSI有自己的UpgradeCode和版本,当我提升它并运行MSI时,旧版本就会以它应该的方式被删除。 (我现在只做重大升级) 但是,当我运行引导程序时(当然我也提高了引导程序的版本号,并且它有自己的自动升级代码永远不会更改)然后我在ARP中获得两个安装和两个条目:一个用于旧的,一个对于新版本的MSI
我到底做错了什么?这让我很失望。
这是msi xml:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define Source = "..\" ?>
<?define Binaries = "..\AwesomeApp\bin\Release" ?>
<?define AppName = "AwesomeApp" ?>
<?define AppDataFolderName = "AwesomeApp" ?>
<?define version = "0.6.0.0" ?>
<?define upgradeCode = "801e999b-8edc-47a4-9793-78273739aa7d"?>
<Product Id="*" Name="AwesomeApp" Language="1033" Version="$(var.version)" Manufacturer="AwesomeCorp"
UpgradeCode="$(var.upgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="yes" />
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="A newer version of this product was found." />
<Feature Id="ProductFeature" Title="$(var.AppName)" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Icon Id="my.ico" SourceFile="my.ico" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UIRef Id="WixUI_InstallDir" />
</Product>
<!-- Fragment stuff omitted for clarity -->
</Wix>
这里的bootstrapper xml:
<Chain>
<!--<PackageGroupRef Id="NetFx40Web" />
<RollbackBoundary />-->
<!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
<MsiPackage Id="Setup"
Compressed="yes"
SourceFile="$(var.AwesomeSetup.TargetPath)"
Vital="yes">
<MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
<!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
</MsiPackage>
</Chain>
</Bundle>
</Wix>
这里是日志:
[0D70:1560][2013-12-24T08:45:56]i001: Burn v3.8.1128.0, Windows v6.2 (Build 9200: Service Pack 0), path: C:\Users\Alex\Downloads\AwesomeSetup.exe, cmdline: '/log MyLogFile.log'
[0D70:1560][2013-12-24T08:45:56]i000: Initializing string variable 'INSTALLDIR' to value '"[ProgramFilesFolder]AwesomeCorp\AwesomeApp"'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\Alex\Downloads\MyLogFile.log'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Alex\Downloads\AwesomeSetup.exe'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleName' to value 'AwsesomeApp'
[0D70:1560][2013-12-24T08:45:57]i000: Loading managed bootstrapper application.
[0D70:1560][2013-12-24T08:45:57]i000: Creating BA thread to run asynchronously.
[0D70:1560][2013-12-24T08:45:57]i100: Detect begin, 2 packages
[0D70:1844][2013-12-24T08:45:57]i000: Parsing command line arguments
System.String[].
[0D70:1844][2013-12-24T08:45:57]i000: Creating UI
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'NETFRAMEWORK40' to value '1'
[0D70:1560][2013-12-24T08:45:57]i102: Detected related bundle: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, type: Upgrade, scope: PerMachine, version: 0.5.0.0, operation: MajorUpgrade
[0D70:1560][2013-12-24T08:45:57]i052: Condition 'NETFRAMEWORK40' evaluates to true.
[0D70:1560][2013-12-24T08:45:57]i101: Detected package: NetFx40Web, state: Present, cached: Complete
[0D70:1560][2013-12-24T08:45:57]i101: Detected package: Setup, state: Absent, cached: None
[0D70:1560][2013-12-24T08:45:57]i199: Detect complete, result: 0x0
[0D70:1844][2013-12-24T08:45:57]i000: Pagestamachine: setting WelcomePage
[0D70:1844][2013-12-24T08:45:57]i000: Getting variable 'INSTALLDIR' from the bundle.
[0D70:1844][2013-12-24T08:45:57]i000: Writing variable 'INSTALLDIR' with the value 'C:\Program Files (x86)\AwesomeCorp\AwesomeApp' to the bundle.
[0D70:1844][2013-12-24T08:45:57]i000: Setting string variable 'INSTALLDIR' to value 'C:\Program Files (x86)\AwesomeCorp\AwesomeApp'
[0D70:1844][2013-12-24T08:45:57]i000: Getting variable 'INSTALLDIR' from the bundle.
[0D70:1560][2013-12-24T08:46:05]i200: Plan begin, 2 packages, action: Install
[0D70:1844][2013-12-24T08:46:05]i000: Pagestamachine: setting ProgressPage
[0D70:1560][2013-12-24T08:46:05]w321: Skipping dependency registration on package with no dependency providers: NetFx40Web
[0D70:1560][2013-12-24T08:46:05]i000: Setting string variable 'WixBundleRollbackLog_Setup' to value 'C:\Users\Alex\Downloads\MyLogFile_0_Setup_rollback.log'
[0D70:1560][2013-12-24T08:46:05]i000: Setting string variable 'WixBundleLog_Setup' to value 'C:\Users\Alex\Downloads\MyLogFile_0_Setup.log'
[0D70:1560][2013-12-24T08:46:05]i201: Planned package: NetFx40Web, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0D70:1560][2013-12-24T08:46:05]i201: Planned package: Setup, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[0D70:1560][2013-12-24T08:46:05]i207: Planned related bundle: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[0D70:1560][2013-12-24T08:46:05]i299: Plan complete, result: 0x0
[0D70:1560][2013-12-24T08:46:05]i300: Apply begin
[0D70:1844][2013-12-24T08:46:05]i000: Pagestamachine: setting ProgressPage
[183C:26FC][2013-12-24T08:46:07]i360: Creating a system restore point.
[183C:26FC][2013-12-24T08:46:07]i361: Created a system restore point.
[183C:26FC][2013-12-24T08:46:07]i000: Caching bundle from: 'C:\Users\Alex\AppData\Local\Temp\{3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}\.be\AwesomeSetup.exe' to: 'C:\ProgramData\Package Cache\{3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}\AwesomeSetup.exe'
[183C:26FC][2013-12-24T08:46:07]i320: Registering bundle dependency provider: {3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}, version: 0.6.0.0
[183C:151C][2013-12-24T08:46:07]i305: Verified acquired payload: Setup at path: C:\ProgramData\Package Cache\.unverified\Setup, moving to: C:\ProgramData\Package Cache\{331D731B-5DAF-4EEC-A89B-C64786EFD96F}v0.6.0.0\AwesomeSetup.msi.
[183C:26FC][2013-12-24T08:46:07]i323: Registering package dependency provider: {331D731B-5DAF-4EEC-A89B-C64786EFD96F}, version: 0.6.0.0, package: Setup
[183C:26FC][2013-12-24T08:46:07]i301: Applying execute package: Setup, action: Install, path: C:\ProgramData\Package Cache\{331D731B-5DAF-4EEC-A89B-C64786EFD96F}v0.6.0.0\AwesomeSetup.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLFOLDER="C:\Program Files (x86)\AwesomeCorp/AwesomeApp"'
[0D70:1560][2013-12-24T08:46:10]i319: Applied execute package: Setup, result: 0x0, restart: None
[183C:26FC][2013-12-24T08:46:10]i325: Registering dependency: {3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5} on package provider: {331D731B-5DAF-4EEC-A89B-C64786EFD96F}, package: Setup
[183C:26FC][2013-12-24T08:46:10]i301: Applying execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe, arguments: '"C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe" -uninstall -quiet -burn.related.upgrade'
[0D70:1560][2013-12-24T08:46:11]i319: Applied execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, result: 0x0, restart: None
[0D70:1560][2013-12-24T08:46:11]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No
[0D70:1844][2013-12-24T08:46:11]i000: Pagestamachine: setting FinishPage
据我了解日志,未检测到现有的msi,因此执行了全新安装,因此ARP中有两个条目。但那怎么可能呢?
答案 0 :(得分:1)
日志中的行:
[183C:26FC][2013-12-24T08:46:10]i301: Applying execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe, arguments: '"C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe" -uninstall -quiet -burn.related.upgrade'
[0D70:1560][2013-12-24T08:46:11]i319: Applied execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, result: 0x0, restart: None
显示正在卸载以前版本的软件包。
成功,因此应删除ARP条目。查找该调用的Burn日志。
答案 1 :(得分:0)
向鲍勃求助,找出答案。 在我使用的管理BA中似乎确实存在一个错误,即Laika42 Themed Bootstrapper Light。
我创建了一个测试项目来验证该行为并将其上传到我的skydrive
我做了什么:
为它创建了一个Lakia42 Bootstrapper项目
现在,当我安装普通的bootstrapper,然后提升bootstrapper版本和安装版本并再次安装时,旧应用及其ARP条目将被正确删除。
当我安装Laika引导程序,然后提升其版本和设置wersion并再次安装时,旧应用程序将被删除* ,但旧的ARP条目仍保留在列表中! *
非常烦人的错误导致我的时间浪费了几个小时......非常感谢Bob!
更新:我刚从Laika42收到了修补后的管理BA dll的邮件。现在它就像一个魅力。希望他们能尽快发布。 “到那时,小心使用Laika42 Bootstrapper Light。
@Bob :我想我欠你一杯冰镇啤酒吧?当你来到维也纳时给我一个电话; - )