【发布时间】:2014-01-12 11:33:33
【问题描述】:
我目前正在为我们的“AwesomeApp”创建一个设置,我将在下文中将其称为“MSI”。我在这里遇到的问题是:
我的 MSI 有自己的 UpgradeCode 和版本,当我提升它并运行 MSI 时,旧版本会按应有的方式删除。 (我现在只做重大升级) 但是,当我运行引导程序时(当然,我也确实提高了引导程序的版本号,并且它有自己的永不改变的 UpgradeCode),然后我在 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>
这里是引导程序 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 中有两个条目。但怎么可能呢?
【问题讨论】:
标签: wix windows-installer burn