Windows installer deletes versioned file during product upgrade, instead of downgrading it

We also encountered this problem where lower-versioned DLLs were not getting reinstalled on a major upgrade. I thought it was strange that the installer would decide which files to install based on the versioning of existing files, then completely uninstall everything, but still only install what what files had been determined to install before uninstalling … Read more

Wix toolset license agreement multi-languages issue

This sounded quite mysterious. A quick search found this existing question: Wix string with characters not available in database ‘s codepage although codepage is set. It seems there is a separate code page setting for the MSI’s summary stream – Codepage Summary property – which is different from the package’s main code page setting. I … Read more

File of a new component isn’t installed because there was an old component with the same file

Similar Answer: How to Explicitly Remove dll During Majorupgrade Using Wix Toolset Major Upgrade Downgrade: In order to overwrite binaries with higher version numbers on major upgrades there are a couple of preferred options: The preferred approach would be to use a companion file (third party files). Or if you can: compile a new binary … Read more

WIX (remove all previous versions)

Ignoring Digits: Extract from the MSI SDK documentation for the ProductVersion property: “Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field…At least one of the three fields of ProductVersion must change for an upgrade … Read more

How do you create an event log source using WiX

Wix has out-of-the-box support for creating event log sources. Assuming you use Wix 3, you first need to add a reference to WixUtilExtension to either your Votive project or the command line. You can then add an EventSource element under a component : <Wix xmlns=”http://schemas.microsoft.com/wix/2006/wi” xmlns:util=”http://schemas.microsoft.com/wix/UtilExtension”> <Component …> … <util:EventSource Log=”Application” Name=”*source name*” EventMessageFile=”*path to … Read more

Registering COM EXE with WIX

The Windows Installer does not recommend using SelfReg to register at install time. Instead, adding the registration to your .wxs code or capturing the registration at build time is highly recommended. To add the registration manually, you don’t use EnsureTable, you use the COM related elements (like Class, ProgId, TypeLib). It can be tedious but … Read more

How can I programmatically read the properties inside an MSI file?

You can use the COM-based API for working with MSI, and do something like Function GetVersion(ByVal msiName) Const msiOpenDatabaseModeReadOnly = 0 Dim msi, db, view Set msi = CreateObject(“WindowsInstaller.Installer”) Set db = msi.OpenDataBase(msiName, msiOpenDatabaseModeReadOnly) Set view = db.OpenView(“SELECT `Value` FROM `Property` WHERE `Property` = ‘ProductVersion'”) Call view.Execute() GetVersion = view.Fetch().StringData(1) End Function

Interrupt installation when custom action returns error

Quick Link: Managed Code Custom Actions (below is for C++ native custom actions). UPDATE: Some helpful links. Hello WiX (minimal WiX Visual Studio Project). WiX quick start suggestions. Debugging Custom Actions (for native code / C++ just attach debugger to msiexec.exe). Microsoft Debugging Environments. Dynamic Link Libraries. Suspected causes: Listing some suggestions at the top … Read more