0
votes

I have created wix bootsrapper application, which install 2 msi and runs 1 exe files. Any time I run it, it appears in control panels (duplicated). But when I want to remove from control panel, it is just running and not uninstalling.

My code for bootsraperr is something like this:

<?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
        <?define LibsDir="..\Shared\Lib\" ?>
            <Bundle Name="Product Setup" Version="1.0.0.0" Manufacturer="MyCompany" UpgradeCode="{32FC4B59-99BE-4617-867C-4620E2E5772F}">

                <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
                    <Payload SourceFile="BootstrapperCore.config" />
                    <Payload SourceFile="$(var.LibsDir)WixWPF.dll" />
                    <Payload SourceFile="$(var.LibsDir)WixWPF.pdb" />
                    <Payload SourceFile="msi\p1.msi" />
                    <Payload SourceFile="msi\p2.msi" />
                    <Payload SourceFile=".../.exe" />

                </BootstrapperApplicationRef>

                <Chain>
                    <PackageGroupRef Id="NetFx40Web" />
                    <MsiPackage Id="Product1" SourceFile="msi\p2.msi" InstallCondition="InstallP=1" />
                    <MsiPackage Id="Product2" SourceFile="msi\P1.msi" />
                    <ExePackage Id="Product3" SourceFile="p2.exe" />
                </Chain>

            </Bundle>
    </Wix>

I want to uninstall it from control panel. How can I handle this?

1
What does msi log tell you?Pavel Anikhouski

1 Answers

0
votes

Bootstrapper can be identified by GUID, UpgradeCode and Version. You can't set GUID of the bootstrapper, it will get random new one after EVERY rebuild. So, if you rebuild your bootstrapper, you will get two bootstrappers with same UpgradeCode and Version, but different GUIDs, and they will both be installed, as two different products.

To uninstall old bootstrapper from control panel you need to have it's setup.exe properly cached and with properly configured Uninstall option. If you have problems, do this:

  1. Find out GUID of bootstrapper you want to uninstall. Best way is to find log file of it's installation in %temp% directory and find this line:

Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{PUT-GUID-HERE}

If you dont have log file, go to par.2

  1. Find and delete mentions of your bootstrapper in following Registry keys. Best way is to do that by GUID, but you also can use DisplayName of the bootstapper. Note: if you use DisplayName, you can mix up both installer bootstrappers.

Computer\HKEY_CLASSES_ROOT\Installer\Dependencies

SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Software\Microsoft\Windows\CurrentVersion\Uninstall

(Hive of the last two depends on InstallScope of your MSIs. If all of them are per-machine, bundle will be in HKLM.)

If bootstrapper was cached, you also need to clean cache.

To avoid duplication in the future, you have several options:

  1. Don't rebuild your bootstrapper until previous version is installed. Or make backup for every build.
  2. Upgrade the Version of bootstrapper before every rebuild, it will then be installed as a update.