WIX Bootstrapper Upgrade - How to uninstall previous version silent
<p>We have a wix setup (based on wix version 3.9) with a standard wix package together with a so called bundle that shows a wpf gui (with Bootstrapper etc), where we can install, update and uninstall the <em>shabang</em>. Everything should be "by the book" as far as I can see...</p>

<p><strong>Now to the problem:</strong> We are able to upgrade by change the version numbers, but we can't seems to be able to disable the uninstallation GUI to popup during the process.</p>

<p>I'm running out of ideas and this is something others must have been solved but I don't find any real solution out there.</p>

<p>As it's managed in C# against the so called engine it's some kind of code there we need. </p>

<p>Currently the code is like this.
In the Run method in my BA class:</p>

<pre><code>    protected override void Run()
    {
        Dispatcher = Dispatcher.CurrentDispatcher;
        var model = new BootstrapperApplicationModel(this);
        Logging logging = new Logging(model);
        var view = new MainView(model, logging, this.RunMode);
        model.SetWindowHandle(view);
        this.Engine.Detect();
        view.Show();
        Dispatcher.Run();
        this.Engine.Quit(model.FinalResult);
    }
</code></pre>

<p>Then in the MainView class (or actually the viewmodel behind) acts on this:</p>

<pre><code>    public void Activate(BootstrapperApplicationModel appModel, Logging modelLogging, LaunchAction runMode)
    {
        this.launchAction = runMode;
        this.model = appModel;
        this.logging = modelLogging;
        this.WireUpEventHandlers();
        this.OpenStartPageView();
    }

    private void WireUpEventHandlers()
    {
        this.model.BootstrapperApplication.PlanComplete += this.PlanComplete;
        this.model.BootstrapperApplication.ApplyComplete += this.ApplyComplete;
        this.model.BootstrapperApplication.ApplyBegin += this.ApplyBegin;
        this.model.BootstrapperApplication.ExecutePackageBegin += this.ExecutePackageBegin;
        this.model.BootstrapperApplication.ExecutePackageComplete += this.ExecutePackageComplete;
        this.model.BootstrapperApplication.PlanMsiFeature += this.SetPlannedFeature;
        this.model.BootstrapperApplication.DetectMsiFeature += SetFeatureDetectedState;
        this.model.BootstrapperApplication.DetectRelatedBundle += this.DetectRelatedBundle;
        this.model.BootstrapperApplication.DetectPackageComplete += this.DetectPackageComplete;
        this.model.BootstrapperApplication.Engine.Detect();
    }
</code></pre>

<p>Hopes that might gives some ideas how we have setup the gui.</p>

<p><strong>It's feels that I need something like the below additional if case in the Activate function:</strong></p>

<pre><code>    public void Activate(BootstrapperApplicationModel appModel, Logging modelLogging, LaunchAction runMode)
    {
        this.launchAction = runMode;
        this.model = appModel;
        this.logging = modelLogging;
        if (this.launchAction == LaunchAction.Uninstall &amp;&amp; /* something */)
        {
            this.model.PlanAction(this.launchAction); // Uninstall
            return;
        }

        this.WireUpEventHandlers();
        this.OpenStartPageView();
    }
</code></pre>

<p>But I have no idea how to pass information from the different versions...</p>

<p>Thanks in advance!</p>