Wix 在重大升级期间不会删除以前版本的burn exe

2023-12-24

我使用burn bootstrapper 创建了一个wix exe。当我尝试对其进行重大升级时,会安装新版本。新升级中缺少的功能也将从现有文件夹结构中删除。但在“添加或删除程序”中我仍然可以找到这两个安装。我已在 Bootstrapper 项目的 Bundle.wxs 文件中将版本从 1.0.0.0 增加到 1.0.1.0。我还将安装项目的 Product 元素中的版本从 1.0.0.0 增加到 1.0.1.0。我没有更改这两个文件中的升级代码。我还在安装项目的 Product.wxs 中为产品 ID 创建了新的 GUID。我在这里做错了什么?为什么“添加或删除程序”中仍然存在以前的版本?请指教。

下面是 Bootstrapper 项目的 Bundle.wxs。

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="Kube Installer" Version="1.0.0.0" Manufacturer="Zone24x7" UpgradeCode="DA4CFB28-4441-43BE-9E8E-0E3C92206324">
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
      <Payload SourceFile="..\CustomBA\BootstrapperCore.config"/>
      <Payload SourceFile="..\CustomBA\bin\Release\CustomBA.dll"/>
      <Payload SourceFile="..\CustomBA\bin\Release\GalaSoft.MvvmLight.WPF4.dll"/>
      <Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.8\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
    </BootstrapperApplicationRef>
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value=""/>
    <WixVariable Id="WixMbaPrereqPackageId" Value=""/>
    <Chain>
      <MsiPackage SourceFile="..\KubeInstaller\bin\Release\KubeInstaller.msi" Id="KubeInstallationPackageId" Cache="yes" Visible="no"/>
    </Chain>

  </Bundle>
</Wix>

下面是安装项目的 Product.wxs。

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <Product Id="70F65E5D-F307-4155-8847-9E5A66024DE7" Name="Installer" Language="1033" Version="1.0.0.0" Manufacturer="Zone24x7" UpgradeCode="E90569B5-372E-45BB-B101-58E0B75AB5C7">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64"/>

    <Property Id="JAVA_CURRENT_VERSION64">
      <RegistrySearch Id="JRE_CURRENT_VERSION_REGSEARCH64" Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment" Name="CurrentVersion" Type="raw" Win64="yes" />
    </Property>

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="Installer" Level="1" >
      <ComponentGroupRef Id="NewFilesGroup2"/>
    </Feature>
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="InstallDir" Name="Installer">
            <Directory Id="MyProgramDir2" Name="KKSDKService" />
        </Directory>
      </Directory>
    </Directory>
  </Fragment>


    <Fragment>
        <DirectoryRef Id="MyProgramDir2" />
    </Fragment>
    <Fragment>
        <ComponentGroup Id="NewFilesGroup2">
            <Component Id="cmpB40D9BC07A10F4C7CA1D590EA22BC096" Directory="MyProgramDir2" Guid="6CEF1581-D3B4-43EC-A561-8E35CFD9AB67">
                <File Id="filCD18463F625BD1E6DABFF218E37514D9" KeyPath="yes" Source="$(var.MyDir2)\BarcodeScannerPlugin.jar" />
            </Component>
            <Component Id="cmpCEA7123B4B5BD564DC3955797750BDBD" Directory="MyProgramDir2" Guid="0828F282-7F66-4550-9D8B-B9DD914F50BA">
                <File Id="fil1C3696A75F0BD878925FCA64111719CE" KeyPath="yes" Source="$(var.MyDir2)\KKSDK.jar" />
            </Component>
            <Component Id="cmp754951538EA86C396458E93F7C5EE8D8" Directory="MyProgramDir2" Guid="83532EF6-0AE6-4B9C-824E-7309E4E97BFA">
                <File Id="fil9EEABE714F6AF741BE3D5AA5B5209994" KeyPath="yes" Source="$(var.MyDir2)\SDKTestPlugin.jar" />
            </Component>
            <Component Id="cmp89BABCFC5524994A65C4664EA4FACE6C" Directory="MyProgramDir2" Guid="3C7A05CE-F786-4E23-80B4-2FCB9ABB314C">
                <File Id="fil65C3299403B5E2113A60782D09D56C54" KeyPath="yes" Source="$(var.MyDir2)\ProfileManagerPlugin.jar" />
            </Component>
            <Component Id="cmpCB38C422B08F1CA1B1E85B1EA87CC1E6" Directory="MyProgramDir2" Guid="66766CBB-A4CD-46C9-94F5-79410A8981C2">
                <File Id="filC9B025CB143BD34F87C0041C5D550955" KeyPath="yes" Source="$(var.MyDir2)\RFIDScannerPlugin.jar" />
            </Component>
            <Component Id="cmp0F9E9EA430641A0340428B2A9E45E672" Directory="MyProgramDir2" Guid="203631E3-581B-49C4-8D38-2B2D1CB9DDCD">
                <File Id="filCA701380AEB33971329784A6C3186684" KeyPath="yes" Source="$(var.MyDir2)\WebSocketServerPlugin.jar" />
            </Component>
        </ComponentGroup>
    </Fragment>

</Wix>

下面是处理安装程序相关操作的类。

 public class MainViewModel : ViewModelBase
    {
        //constructor
        public MainViewModel(BootstrapperApplication bootstrapper)
        {

            this.IsThinking = false;

            this.Bootstrapper = bootstrapper;
            this.Bootstrapper.ApplyComplete += this.OnApplyComplete;
            this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete;
            this.Bootstrapper.PlanComplete += this.OnPlanComplete;

            this.Bootstrapper.CacheAcquireProgress += (sender, args) =>
            {
                this.cacheProgress = args.OverallPercentage;
                this.Progress = (this.cacheProgress + this.executeProgress) / 2;
            };
            this.Bootstrapper.ExecuteProgress += (sender, args) =>
            {
                this.executeProgress = args.OverallPercentage;
                this.Progress = (this.cacheProgress + this.executeProgress) / 2;
            };
        }

        #region Properties

        private bool installEnabled;
        public bool InstallEnabled
        {
            get { return installEnabled; }
            set
            {
                installEnabled = value;
                RaisePropertyChanged("InstallEnabled");
            }
        }

        private bool uninstallEnabled;
        public bool UninstallEnabled
        {
            get { return uninstallEnabled; }
            set
            {
                uninstallEnabled = value;
                RaisePropertyChanged("UninstallEnabled");
            }
        }

        private bool isThinking;
        public bool IsThinking
        {
            get { return isThinking; }
            set
            {
                isThinking = value;
                RaisePropertyChanged("IsThinking");
            }
        }

        private int progress;
        public int Progress
        {
            get { return progress; }
            set
            {
                this.progress = value;
                RaisePropertyChanged("Progress");
            }
        }

        private int cacheProgress;
        private int executeProgress;

        public BootstrapperApplication Bootstrapper { get; private set; }

        #endregion //Properties

        #region Methods

        public void InstallExecute()
        {
            IsThinking = true;
            Bootstrapper.Engine.Plan(LaunchAction.Install);
        }

        public void UninstallExecute()
        {
            IsThinking = true;
            Bootstrapper.Engine.Plan(LaunchAction.Uninstall);
        }

        public void ExitExecute()
        {
            CustomBA.BootstrapperDispatcher.InvokeShutdown();
        }

        /// <summary>
        /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
        /// This is called after a bundle installation has completed. Make sure we updated the view.
        /// </summary>
        private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            IsThinking = false;
            InstallEnabled = false;
            UninstallEnabled = false;
            this.Progress = 100;
            ExitExecute();
        }

        /// <summary>
        /// Method that gets invoked when the Bootstrapper DetectPackageComplete event is fired.
        /// Checks the PackageId and sets the installation scenario. The PackageId is the ID
        /// specified in one of the package elements (msipackage, exepackage, msppackage,
        /// msupackage) in the WiX bundle.
        /// </summary>
        private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
        {
            if (e.PackageId == "KubeInstallationPackageId")
            {
                if (e.State == PackageState.Absent)
                    InstallEnabled = true;

                else if (e.State == PackageState.Present)
                    UninstallEnabled = true;
            }
        }

        /// <summary>
        /// Method that gets invoked when the Bootstrapper PlanComplete event is fired.
        /// If the planning was successful, it instructs the Bootstrapper Engine to 
        /// install the packages.
        /// </summary>
        private void OnPlanComplete(object sender, PlanCompleteEventArgs e)
        {
            if (e.Status >= 0)
                Bootstrapper.Engine.Apply(System.IntPtr.Zero);
        }

        #endregion //Methods

        #region RelayCommands

        private RelayCommand installCommand;
        public RelayCommand InstallCommand
        {
            get
            {
                if (installCommand == null)
                    installCommand = new RelayCommand(() => InstallExecute(), () => InstallEnabled == true);

                return installCommand;
            }
        }

        private RelayCommand uninstallCommand;
        public RelayCommand UninstallCommand
        {
            get
            {
                if (uninstallCommand == null)
                    uninstallCommand = new RelayCommand(() => UninstallExecute(), () => UninstallEnabled == true);

                return uninstallCommand;
            }
        }

        private RelayCommand exitCommand;
        public RelayCommand ExitCommand
        {
            get
            {
                if (exitCommand == null)
                    exitCommand = new RelayCommand(() => ExitExecute());

                return exitCommand;
            }
        }

        #endregion //RelayCommands
    }

日志文件 1:

[0980:3888][2016-04-22T16:49:18]i001: Burn v3.10.2.2516, Windows v6.3 (Build 9600: Service Pack 0), path: C:\ProgramData\Package Cache\{71ae2d4e-5c00-442b-9ea1-00cec549800d}\KubePlatformSetup.exe
[0980:3888][2016-04-22T16:49:18]i003: This bundle is being run by a related bundle as type 'Upgrade'.
[0980:3888][2016-04-22T16:49:18]i009: Command Line: '-uninstall -quiet -burn.related.upgrade -burn.ancestors={f57e276b-2b99-4f55-9566-88f47c0a065c} -burn.embedded BurnPipe.{22EB703C-0051-46E7-8B68-BA209900F6F7} {B0B02376-A988-437A-92A4-6116CFBC5526} 13952'
[0980:3888][2016-04-22T16:49:18]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164918.log'
[0980:3888][2016-04-22T16:49:18]i000: Setting string variable 'WixBundleManufacturer' to value 'Zone24x7'
[0980:3888][2016-04-22T16:49:18]i000: Loading managed bootstrapper application.
[0980:3888][2016-04-22T16:49:18]i000: Creating BA thread to run asynchronously.
[0980:37B4][2016-04-22T16:49:18]i000: Launching custom TestBA UX
[0980:3888][2016-04-22T16:49:19]i100: Detect begin, 2 packages
[0980:3888][2016-04-22T16:49:19]i102: Detected related bundle: {f57e276b-2b99-4f55-9566-88f47c0a065c}, type: Upgrade, scope: PerMachine, version: 1.0.1.0, operation: None
[0980:3888][2016-04-22T16:49:19]i103: Detected related package: {8C442A83-F559-488C-8CC4-21B1626F4B8E}, scope: PerMachine, version: 1.0.1.0, language: 0 operation: Downgrade
[0980:3888][2016-04-22T16:49:19]i103: Detected related package: {8201DD23-40A5-418B-B016-4D29BE6F010B}, scope: PerMachine, version: 1.0.1.0, language: 0 operation: Downgrade
[0980:3888][2016-04-22T16:49:19]i101: Detected package: KubeUpdaterServiceInstallerId, state: Obsolete, cached: Complete
[0980:3888][2016-04-22T16:49:19]i101: Detected package: MosquittoInstallerId, state: Obsolete, cached: Complete
[0980:3888][2016-04-22T16:49:19]i199: Detect complete, result: 0x0
[0980:3888][2016-04-22T16:51:43]i500: Shutting down, exit code: 0x0
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleAction = 3
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleElevated = 1
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleInstalled = 1
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleLastUsedSource = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleLog = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164918.log
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleManufacturer = Zone24x7
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleName = KubePlatformSetup
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleOriginalSource = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleOriginalSourceFolder = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleProviderKey = {71ae2d4e-5c00-442b-9ea1-00cec549800d}
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleTag = 
[0980:3888][2016-04-22T16:51:43]i410: Variable: WixBundleVersion = 1.0.0.0
[0980:3888][2016-04-22T16:51:43]i007: Exit code: 0x0, restarting: No

日志文件2:

[3204:32B0][2016-04-22T16:48:38]i001: Burn v3.10.2.2516, Windows v6.3 (Build 9600: Service Pack 0), path: C:\Users\MACILA~1\AppData\Local\Temp\{E6470133-8EFE-49DE-8561-A335091D3464}\.cr\KubePlatformSetup.exe
[3204:32B0][2016-04-22T16:48:38]i009: Command Line: '-burn.clean.room=G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe'
[3204:32B0][2016-04-22T16:48:38]i000: Setting string variable 'WixBundleOriginalSource' to value 'G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe'
[3204:32B0][2016-04-22T16:48:38]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\'
[3204:32B0][2016-04-22T16:48:38]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838.log'
[3204:32B0][2016-04-22T16:48:38]i000: Setting string variable 'WixBundleName' to value 'KubePlatformSetup'
[3204:32B0][2016-04-22T16:48:38]i000: Setting string variable 'WixBundleManufacturer' to value 'Zone24x7'
[3204:32B0][2016-04-22T16:48:38]i000: Loading managed bootstrapper application.
[3204:32B0][2016-04-22T16:48:38]i000: Creating BA thread to run asynchronously.
[3204:3A5C][2016-04-22T16:48:38]i000: Launching custom TestBA UX
[3204:32B0][2016-04-22T16:48:39]i100: Detect begin, 2 packages
[3204:32B0][2016-04-22T16:48:39]i102: Detected related bundle: {71ae2d4e-5c00-442b-9ea1-00cec549800d}, type: Upgrade, scope: PerMachine, version: 1.0.0.0, operation: MajorUpgrade
[3204:32B0][2016-04-22T16:48:39]i103: Detected related package: {398C5992-4E70-4844-8063-48639892BACF}, scope: PerMachine, version: 1.0.0.0, language: 0 operation: MajorUpgrade
[3204:32B0][2016-04-22T16:48:39]i103: Detected related package: {392D3E7F-6FCB-4EFD-A40F-B2F7C2CB6D44}, scope: PerMachine, version: 1.0.0.0, language: 0 operation: MajorUpgrade
[3204:32B0][2016-04-22T16:48:39]i101: Detected package: KubeUpdaterServiceInstallerId, state: Absent, cached: None
[3204:32B0][2016-04-22T16:48:39]i101: Detected package: MosquittoInstallerId, state: Absent, cached: None
[3204:32B0][2016-04-22T16:48:39]i199: Detect complete, result: 0x0
[3204:32B0][2016-04-22T16:48:40]i200: Plan begin, 2 packages, action: Install
[3204:32B0][2016-04-22T16:48:40]i000: Setting string variable 'WixBundleRollbackLog_KubeUpdaterServiceInstallerId' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_000_KubeUpdaterServiceInstallerId_rollback.log'
[3204:32B0][2016-04-22T16:48:40]i000: Setting string variable 'WixBundleLog_KubeUpdaterServiceInstallerId' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_000_KubeUpdaterServiceInstallerId.log'
[3204:32B0][2016-04-22T16:48:40]i000: Setting string variable 'WixBundleRollbackLog_MosquittoInstallerId' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_001_MosquittoInstallerId_rollback.log'
[3204:32B0][2016-04-22T16:48:40]i000: Setting string variable 'WixBundleLog_MosquittoInstallerId' to value 'C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_001_MosquittoInstallerId.log'
[3204:32B0][2016-04-22T16:48:40]i201: Planned package: KubeUpdaterServiceInstallerId, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[3204:32B0][2016-04-22T16:48:40]i201: Planned package: MosquittoInstallerId, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[3204:32B0][2016-04-22T16:48:40]i207: Planned related bundle: {71ae2d4e-5c00-442b-9ea1-00cec549800d}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[3204:32B0][2016-04-22T16:48:40]i299: Plan complete, result: 0x0
[3204:32B0][2016-04-22T16:48:40]i300: Apply begin
[3204:32B0][2016-04-22T16:48:40]i010: Launching elevated engine process.
[3204:32B0][2016-04-22T16:48:40]i011: Launched elevated engine process.
[3204:32B0][2016-04-22T16:48:40]i012: Connected to elevated engine.
[3680:38D0][2016-04-22T16:48:40]i358: Pausing automatic updates.
[3680:38D0][2016-04-22T16:48:40]i359: Paused automatic updates.
[3680:38D0][2016-04-22T16:48:40]i360: Creating a system restore point.
[3680:38D0][2016-04-22T16:48:40]i361: Created a system restore point.
[3680:38D0][2016-04-22T16:48:40]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f57e276b-2b99-4f55-9566-88f47c0a065c}, options: 0x7, disable resume: No
[3680:38D0][2016-04-22T16:48:40]i000: Caching bundle from: 'C:\Users\MACILA~1\AppData\Local\Temp\{89CCD5C8-EB48-4FB3-8FB5-32FC9EEAB83F}\.be\KubePlatformSetup.exe' to: 'C:\ProgramData\Package Cache\{f57e276b-2b99-4f55-9566-88f47c0a065c}\KubePlatformSetup.exe'
[3680:38D0][2016-04-22T16:48:40]i320: Registering bundle dependency provider: {f57e276b-2b99-4f55-9566-88f47c0a065c}, version: 1.0.1.0
[3680:38D0][2016-04-22T16:48:40]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f57e276b-2b99-4f55-9566-88f47c0a065c}, resume: Active, restart initiated: No, disable resume: No
[3204:2B40][2016-04-22T16:48:40]i336: Acquiring container: WixAttachedContainer, copy from: G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe
[3204:2B40][2016-04-22T16:48:40]i000: Setting string variable 'WixBundleLastUsedSource' to value 'G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\'
[3680:350C][2016-04-22T16:48:40]i305: Verified acquired payload: KubeUpdaterServiceInstallerId at path: C:\ProgramData\Package Cache\.unverified\KubeUpdaterServiceInstallerId, moving to: C:\ProgramData\Package Cache\{8C442A83-F559-488C-8CC4-21B1626F4B8E}v1.0.1.0\KubeUpdaterServiceInstaller.msi.
[3680:350C][2016-04-22T16:48:40]i305: Verified acquired payload: cabDF68CF429512A78026D040F0FB13A50B at path: C:\ProgramData\Package Cache\.unverified\cabDF68CF429512A78026D040F0FB13A50B, moving to: C:\ProgramData\Package Cache\{8C442A83-F559-488C-8CC4-21B1626F4B8E}v1.0.1.0\cab1.cab.
[3680:350C][2016-04-22T16:48:40]i305: Verified acquired payload: MosquittoInstallerId at path: C:\ProgramData\Package Cache\.unverified\MosquittoInstallerId, moving to: C:\ProgramData\Package Cache\{8201DD23-40A5-418B-B016-4D29BE6F010B}v1.0.1.0\MosquittoInstaller.msi.
[3680:350C][2016-04-22T16:48:40]i305: Verified acquired payload: cab657E45B8C9A7EF24C9A74563C2FA6EB3 at path: C:\ProgramData\Package Cache\.unverified\cab657E45B8C9A7EF24C9A74563C2FA6EB3, moving to: C:\ProgramData\Package Cache\{8201DD23-40A5-418B-B016-4D29BE6F010B}v1.0.1.0\cab1.cab.
[3680:38D0][2016-04-22T16:48:40]i323: Registering package dependency provider: {8C442A83-F559-488C-8CC4-21B1626F4B8E}, version: 1.0.1.0, package: KubeUpdaterServiceInstallerId
[3680:38D0][2016-04-22T16:48:40]i301: Applying execute package: KubeUpdaterServiceInstallerId, action: Install, path: C:\ProgramData\Package Cache\{8C442A83-F559-488C-8CC4-21B1626F4B8E}v1.0.1.0\KubeUpdaterServiceInstaller.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLLOCATION="G:\"'
[3204:32B0][2016-04-22T16:49:17]i319: Applied execute package: KubeUpdaterServiceInstallerId, result: 0x0, restart: None
[3680:38D0][2016-04-22T16:49:17]i325: Registering dependency: {f57e276b-2b99-4f55-9566-88f47c0a065c} on package provider: {8C442A83-F559-488C-8CC4-21B1626F4B8E}, package: KubeUpdaterServiceInstallerId
[3680:38D0][2016-04-22T16:49:17]i323: Registering package dependency provider: {8201DD23-40A5-418B-B016-4D29BE6F010B}, version: 1.0.1.0, package: MosquittoInstallerId
[3680:38D0][2016-04-22T16:49:17]i301: Applying execute package: MosquittoInstallerId, action: Install, path: C:\ProgramData\Package Cache\{8201DD23-40A5-418B-B016-4D29BE6F010B}v1.0.1.0\MosquittoInstaller.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLLOCATION="G:\"'
[3204:32B0][2016-04-22T16:49:18]i319: Applied execute package: MosquittoInstallerId, result: 0x0, restart: None
[3680:38D0][2016-04-22T16:49:18]i325: Registering dependency: {f57e276b-2b99-4f55-9566-88f47c0a065c} on package provider: {8201DD23-40A5-418B-B016-4D29BE6F010B}, package: MosquittoInstallerId
[3680:38D0][2016-04-22T16:49:18]i301: Applying execute package: {71ae2d4e-5c00-442b-9ea1-00cec549800d}, action: Uninstall, path: C:\ProgramData\Package Cache\{71ae2d4e-5c00-442b-9ea1-00cec549800d}\KubePlatformSetup.exe, arguments: '"C:\ProgramData\Package Cache\{71ae2d4e-5c00-442b-9ea1-00cec549800d}\KubePlatformSetup.exe" -uninstall -quiet -burn.related.upgrade -burn.ancestors={f57e276b-2b99-4f55-9566-88f47c0a065c}'
[3204:32B0][2016-04-22T16:51:43]i319: Applied execute package: {71ae2d4e-5c00-442b-9ea1-00cec549800d}, result: 0x0, restart: None
[3680:38D0][2016-04-22T16:51:43]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f57e276b-2b99-4f55-9566-88f47c0a065c}, resume: ARP, restart: None, disable resume: No
[3680:38D0][2016-04-22T16:51:43]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{f57e276b-2b99-4f55-9566-88f47c0a065c}, resume: ARP, restart initiated: No, disable resume: No
[3204:32B0][2016-04-22T16:51:43]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
[3204:32B0][2016-04-22T16:51:43]i500: Shutting down, exit code: 0x0
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleAction = 5
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleElevated = 1
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleLastUsedSource = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleLog = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838.log
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleLog_KubeUpdaterServiceInstallerId = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_000_KubeUpdaterServiceInstallerId.log
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleLog_MosquittoInstallerId = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_001_MosquittoInstallerId.log
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleManufacturer = Zone24x7
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleName = KubePlatformSetup
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleOriginalSource = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleOriginalSourceFolder = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleProviderKey = {f57e276b-2b99-4f55-9566-88f47c0a065c}
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleRollbackLog_KubeUpdaterServiceInstallerId = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_000_KubeUpdaterServiceInstallerId_rollback.log
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleRollbackLog_MosquittoInstallerId = C:\Users\MACILA~1\AppData\Local\Temp\KubePlatformSetup_20160422164838_001_MosquittoInstallerId_rollback.log
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleSourceProcessFolder = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleSourceProcessPath = G:\Projects\Kube2\kube-installer\KubePlatformSetup\KubePlatformSetup\bin\Release\KubePlatformSetup.exe
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleTag = 
[3204:32B0][2016-04-22T16:51:43]i410: Variable: WixBundleVersion = 1.0.1.0
[3204:32B0][2016-04-22T16:51:43]i007: Exit code: 0x0, restarting: No

我终于找到了解决方案。我必须连接 DetectComplete 方法并调用引擎上的计划方法。下面是我是如何做到的。

void DetectComplete(object sender, DetectCompleteEventArgs e)
    {
        Bootstrapper.Engine.Log(LogLevel.Verbose,"fired! but does that give you any clue?! idiot!");
        if (LaunchAction.Uninstall == Bootstrapper.Command.Action)
        {
            Bootstrapper.Engine.Log(LogLevel.Verbose, "Invoking automatic plan for uninstall");
            Bootstrapper.Engine.Plan(LaunchAction.Uninstall);
        } 
    }
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Wix 在重大升级期间不会删除以前版本的burn exe 的相关文章

  • WiX 安装程序:使用 xslt 和 heat.exe 来更新属性

    我正在尝试为 Windows 服务创建 WiX 安装程序 并且我读到需要将所有文件的 KeyPath 设置为 no WiX 脚本中的 exe 除外 我目前正在使用 Heat exe 生成目录和文件结构 这是我的命令 WIX bin heat
  • 作为安装过程的一部分,如何让 WiX 调用 .NET 程序集中的方法?

    我正在迁移一些现有产品以使用 WiX 3 5 我正在使用 Votive VS 集成 我正在安装的一些项目需要向第三方框架注册 要求是我必须在第三方 NET 程序集中调用 Register 方法来通知它我正在安装的项目是否存在 它需要一个 C
  • 未定义的预处理器变量“$(var.WixInstall.TargetPath)”。 WixInstaller D:work\Extractor\WixInstaller\Product.wxs

    我在使用 wix 创建 Windows 安装程序时遇到以下错误 未定义的预处理器变量 var WixInstall TargetPath WixInstaller D work Extractor WixInstaller Product
  • Wix 自定义操作仅在安装期间执行,但不在升级和删除时执行?

    我有一个自定义操作 该操作只能在安装期间执行 而不能在次要版本升级和删除期间执行 我尝试了不同的条件 但 CA 正在次要版本期间执行 1 未安装 或不 删除 全部 并升级产品代码 2 未安装 3 未安装 或未 已安装并删除 全部 并升级产品
  • 如何在两个 WiX 项目中共享 WiX 片段?

    我们在 SomeDialog wxs 文件中有一个 WiX 片段 它提示用户输入一些信息 它在控制对话框顺序的 InstallerUI wxs 文件中的另一个片段中引用 当然 Product wxs是我们的主文件 效果很好 现在 我有第二个
  • 如何使用 WiX 安装和启动 Windows 服务

    我尝试在 Wix 中使用下面的代码 但是在安装时 安装程 序在 正在启动服务 状态下冻结了大约 3 分钟 然后我收到此消息 Service Jobservice 无法启动 请验证您是否有足够的权限来启动系统服务 我的代码有什么错误吗 并且可
  • 成功后动态改变EndDialog中的RTF内容

    多亏了这个question https stackoverflow com a 33679439 1076116 我能够执行自定义操作来临时更新和动态修改 MSI 数据库 简而言之 我正在做 CustomAction public stat
  • 如何确定现有应用程序的安装范围?

    我有一个基于的安装程序WixUI Advanced允许用户选择安装范围 每个用户或机器范围 升级时 安装了较低版本的现有应用程序 我想隐藏安装范围屏幕并自动选择他们上次选择的安装范围 如何判断先前安装使用的安装范围 Edit 查看我的 MS
  • 我应该如何处理 WiX 安装程序中的产品升级?

    我有一个相当大的 WiX 安装程序 250 Mb 以上 我正在尝试制定合适的升级策略 安装程序中的大多数文件都不会更改 并且当只有一两个文件发生更改时 我们不希望分发整个包 我研究了主要和次要升级 我的理解是 如果产品 ID 发生变化 只要
  • WiX 在构建服务器上失败

    我有一个使用 WiX 的项目 它在我的本地计算机上运行良好 但是当我发布到构建服务器时 构建会因以下内容而崩溃 来自 MSBuild 日志 Using HeatDirectory task from assembly C Program F
  • ICE61:该产品应仅删除其自身的旧版本

    我正在关注第二个答案here https stackoverflow com questions 500703 how to get wix to update a previously installed version of a pro
  • 在 WiX Bundle 中包含 .NET 安装程序未检测是否已安装

    我使用的是 WiX 3 7 无法让简单的 捆绑元素正常工作 因为它不会带来 Net FX 安装程序包 也不会将其嵌入到 setup exe 中 我已经在我的程序中为此创建了自己的包Bundle wxs文件 但我仍然遇到麻烦 即使机器已经安装
  • WiX Burn:从注册表读取 LaunchTarget

    我是 WiX 的新手 我试图让我的 Bootstrapper 在完成后启动我安装的应用程序 为了实现这一点 我正在使用
  • 根据 VS 活动配置定义 Wix 属性和值

    如何定义根据激活的 Visual Studio 配置而变化的 Wix 属性和值 例如对于我们的发布版本 var x 1 对于导出版本 var x 2 我们使用 wixproj 文件将属性传递到 WiX
  • 使用 元素通过 Wix 运行 SQL 脚本文件

    我是 Wix 安装程序的新手 我有一个要求 必须提供 SQL Server 登录凭据并从特定路径运行脚本 我不明白出了什么问题 项目已成功构建并创建了 msi 运行后我收到以下错误 错误26204 错误 2147217900 无法执行SQL
  • 自定义 WiX Burn 引导程序用户界面?

    我主要使用 WiX 3 6 创建一个安装包 这样我就可以利用Burn http en wikipedia org wiki WiX Burn引导功能 到目前为止 我已经将多个 MSI 软件包捆绑在一起 这些软件包将与内置引导程序应用程序一起
  • WIX 自动生成 GUID *?

    假设我生成产品 ID 为 的 WIX XML 文件 另外 对于每个组件 GUID 我都使用
  • 让 WIX 在项目中包含引用

    我对 WiX 和设置自定义安装程序完全陌生 所以我对问题的主题表示歉意 我有一个内部业务应用程序 日记 它构建并运行良好 因此我按照教程 官方文档添加 WiX 项目并引用日记的 csproj 然后构建并运行这个最基本版本的 WiX 安装程序
  • 如何使用 WiX 卸载时终止进程

    我正在使用 Wix 创建 msi 安装文件 当我卸载应用程序时 它仍然在工作 并且我可以在任务管理器中看到它 我已经尝试过自定义操作的延迟执行 如 Wix 文档中所述 https wixtoolset org documentation m
  • 将构建参数传递给 .wxs 文件以动态构建 wix 安装程序

    我是一名学生开发人员 我已经为我现在工作的公司构建了几个安装程序 所以我对WIX还是比较熟悉的 我们最近决定拥有一个构建服务器来自动构建我们的解决方案 它构建调试和发布以及混淆 和非混淆 项目 你真的不需要理解这些 您需要了解的是 我有相同

随机推荐