Upgrade through SilentBootstrapperApplication keeps the older version entry in programs and features

Sep 27, 2016 at 10:06 AM
Hello, Oleg,

I have created two BAs for two different versions of the product. I've installed setup_v1.exe and setup_v2.exe. There are "My Product" with version 1.0.0.0 and "My Product" with version 2.0.0.0 in programs and features.

static public void Main(string[] args)
{
Build_V1();
Build_V2();
}

static public void Build_V1()
{
var bootstrapper =
        new Bundle("My Product",
            new PackageGroupRef("NetFx40Web"),
            new MsiPackage("ManagementStudio_v1.msi") { DisplayInternalUI = true });

bootstrapper.Version = new Version("1.0.0.0");
bootstrapper.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25889b");
bootstrapper.Application = new SilentBootstrapperApplication();
bootstrapper.Build("setup_v1.exe");
}

static public void Build_V2()
{
var bootstrapper =
        new Bundle("My Product",
            new PackageGroupRef("NetFx40Web"),
            new MsiPackage("ManagementStudio_v2.msi") { DisplayInternalUI = true });

bootstrapper.Version = new Version("2.0.0.0");
bootstrapper.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25889b");
bootstrapper.Application = new SilentBootstrapperApplication();
bootstrapper.Build("setup_v2.exe");
}


I tried to don't use SilentBootstrapperApplication. After installation setup_v1.exe and setup_v2.exe there is only "My Product" with version 2.0.0.0 in programs and features.
Coordinator
Sep 27, 2016 at 11:36 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Sep 27, 2016 at 11:56 AM
This mean that the "installed product" detection algorithm of SilentBootstrapperApplication is inadequate in this case. I have created the issue from your report.

If you are still keen to use custom BA then you can take the WixBootstrapper_NoUI sample (an equivalent of SilentBootstrapperApplication). Though you will need to update the detection algorithm to make it suitable for your scenario.