How can I find the upgrade code for an installed application in C#?

I have discovered the upgrade codes are stored in the following registry location. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes The registry key name is the upgrade code and the registry key value name is the product code. I can easily extract these values however the codes are stored in a different format. The red circle shows the formatted upgrade code, … Read more

wix major upgrade not installing all files

The log file provided shows that newer versions of a few files already on the machine: MSI (s) (0C:5C) [16:13:25:890]: Disallowing installation of component: {015A4DC1-56F4-562B-96B5-B3BE0D45FA5F} since the same component with higher versioned keyfile exists MSI (s) (0C:5C) [16:13:25:890]: Disallowing installation of component: {4B6A1404-3892-5BEF-AB47-8FE3149211A4} since the same component with higher versioned keyfile exists I’ve seen this … Read more

Custom WiX Burn bootstrapper user interface?

The key thing to know is that there is a BootstrapperCore.dll in the WiX binaries that defines a BootstrapperApplication class that handles the integration with the Burn engine. I needed to create my own derived class and override the ‘Run’ method to launch my custom UI. It was also helpful to use the WixBA project … Read more

Wix custom uninstallation action – how to run before msi removing files

The problem is that my custom uninstallation action runs after the removal of standard install files That’s because you have scheduled it before InstallFiles, which comes after RemoveFiles in a standard InstallExecuteSequence. You can also open your MSI file in an editor like Orca or InstEd and have a look at the InstallExecuteSequence table. Sort … Read more

Wix generate single component id for entire tree

Use one file per component – this avoids all sorts of problems (except .NET assemblies spanning multiple files). See the following thread: One file per component or several files per component? Wix is a great framework for creating installers, but it has a steep learning curve. I strongly recommend you read a few sections of … Read more

Programmatically installing MSI packages

I find the Deployment Tools Foundation project mentioned above to be a solid way to do this from .NET. Having referenced Microsoft.Deployment.WindowsInstaller.dll, use code like this to install a package: Installer.SetInternalUI(InstallUIOptions.Silent); Installer.InstallProduct(msiFilename, “ACTION=INSTALL ALLUSERS=2 MSIINSTALLPERUSER=”); The documentation for the .NET wrapper is in a .chm file in the Windows Installer XML installation directory in Program … Read more