[wix-users] Custom Bootstrapper - avoiding auto uninstall of installed msi package when running bootstrapper 2nd time
Baumann Ingo
i.baumann at commend.com
Tue Sep 13 08:42:00 PDT 2016
Thanks Sean. I'm calling Plan with Install. Explicit setting of state in handle of PlanPackageBegin does the trick.
-----Ursprüngliche Nachricht-----
Von: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] Im Auftrag von Sean Hall
Gesendet: Dienstag, 13. September 2016 17:22
An: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Betreff: Re: [wix-users] Custom Bootstrapper - avoiding auto uninstall of installed msi package when running bootstrapper 2nd time
When running the second time, are you calling Plan and Apply with Install or Modify? IIRC, Modify would not try to uninstall packages that were already installed. Otherwise, you can customize execution per package in OnPlanPackageBegin.
On Tue, Sep 13, 2016 at 9:48 AM, Baumann Ingo <i.baumann at commend.com> wrote:
> In my custom bootstrapper UI I'm providing checkboxes to select
> packages to install. According to the selected checkboxes, I'm setting
> string variables (A, B, C) to True/False before calling Engine.Plan(LaunchAction.
> Install).
>
> Chain as below
> <chain>
> <MsiPackage SourceFile="MSI Packages\A.msi" DisplayInternalUI="yes"
> Description="A Setup" DisplayName="A" InstallCondition="A="True""
> Id="A" Permanent="no" Vital="yes" Visible="yes">
> </MsiPackage>
> <RollbackBoundary />
> <MsiPackage SourceFile="MSI Packages\B.msi" DisplayInternalUI="yes"
> Description="B Setup" DisplayName="B" InstallCondition="B="True""
> Id="B" Permanent="no" Vital="yes" Visible="yes">
> </MsiPackage>
> <RollbackBoundary />
> <MsiPackage SourceFile="MSI Packages\C.msi" DisplayInternalUI="yes"
> Description="C Setup" DisplayName="C" InstallCondition="C="True""
> Id="C" Permanent="no" Vital="yes" Visible="yes">
> </MsiPackage>
> </chain>
>
> I've checked the log for evaluation condition and looks fine. E.g.:
> Condition 'A="True"' evaluates to false.
>
> Installing an MSI with above explained conditioning works fine. But
> when I run the bootstrapper again and install another package, a
> previous package is getting uninstalled.
>
>
> 1. Run bootstrapper and install A and C (see execute: Install in log
> below)
>
> Planned package: A, state: Absent, default requested: Present, ba
> requested: Present, execute: Install, rollback: Uninstall, cache: Yes,
> uncache: No, dependency: Register
>
> Planned package: B, state: Absent, default requested: Absent, ba
> requested: Absent, execute: None, rollback: None, cache: No, uncache:
> No,
> dependency: None
>
> Planned package: C, state: Absent, default requested: Present, ba
> requested: Present, execute: Install, rollback: Uninstall, cache: No,
> uncache: No, dependency: Register
>
> 2. Run bootstrapper again and install B will uninstall C (see
> execute: Uninstall in log below)
> Planned package: A, state: Present, default requested: Absent, ba
> requested: Absent, execute: None, rollback: None, cache: No, uncache:
> No,
> dependency: Unregister
> Planned package: B, state: Absent, default requested: Present, ba
> requested: Present, execute: Install, rollback: Uninstall, cache: Yes,
> uncache: No, dependency: Register
> Planned package: C, state: Present, default requested: Absent, ba
> requested: Absent, execute: Uninstall, rollback: Install, cache: No,
> uncache: Yes, dependency: Unregister
>
> How can I avoid removal of a packages at all?
> Is there a way to customize execution per package?
>
> Many thanks,
> Ingo
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list