Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Bootstrapper exe file and multiple launch

$
0
0
> Ideally, i want let to user know that the application (from bundle msi file) is already installed and he has to uninstall it first. Is it possible?
Then you should not be using silent bootstrapper as it automatically triggers install/uninstall based on the current state of the primary product. You can either use standard bootstrapper UI (provided by WiX), which has a clear indication of the current state of the product and doesn't proceed with the installation without the user confirmation.

Alternatively you can still quickly create your own bootstrapper UI (or even modify the silent bootstrapper UI) and ask the user all the question you need. See WixBootstrapper_NoUI sample for details. This sample has CustomSilentBA.cs file which implements custom bootstrapper application (BA). You can extend it with any sort of UI and also modify the "planing" algorithm:
DetectPackageComplete += (s, e) =>
{
    //Presence or absence of MyProductPackageId product will be a deciding factor //for initializing BA for Install or Uninstall.if (e.PackageId == "MyProductPackageId")
        {
            if (e.State == PackageState.Absent)
                this.Engine.Plan(LaunchAction.Install);
            elseif (e.State == PackageState.Present)
                this.Engine.Plan(LaunchAction.Uninstall);
        }
};
And sample WixBootstrapper_UI shouws how to create a WPF UI for your bundle.

Viewing all articles
Browse latest Browse all 1354

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>