gpt4 book ai didi

WIX 刻录包 - 不删除旧版本

转载 作者:行者123 更新时间:2023-12-05 00:18:52 28 4
gpt4 key购买 nike

我目前正在为我们的“AwesomeApp”创建一个设置,我将在下文中将其称为“MSI”。我在这里遇到的问题是:

我的 MSI 有自己的 UpgradeCode 和版本,当我提升它并运行 MSI 时,旧版本就会按应有的方式被删除。 (我现在只做重大升级)但是,当我运行 Bootstrap 时(当然,我确实也提高了 Bootstrap 的版本号,并且它有自己的 UpgradeCode,它永远不会改变)然后我在 ARP 中得到了两个安装和两个条目:一个用于旧的,一个用于对于新版本的微星

我到底做错了什么?这让我抓狂。

这是 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>

这里是 Bootstrap 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 中有两个条目。但这怎么可能呢?

最佳答案

日志中的行:

[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

表明正在卸载以前版本的 bundle 。

它是成功的,因此应该删除 ARP 条目。查找该调用的 Burn 日志。

关于WIX 刻录包 - 不删除旧版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20757256/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com