Stijn De Winter Stijn De Winter - 3 months ago 18
Ini Question

Read ini value in WiX Bootstrapper(Burn)

With my WiX installer I have to replace an existing installer.

The current installer writes the version number and some more things to an .ini file. When the WiX installer is run I have to display the currently installed version and the version to be installed.

I now have the following for the install page:

<Page Name="Install">
<Text X="11" Y="-73" Width="246" Height="17" FontId="3">Currently installed version:</Text>
<Text X="11" Y="-73" Width="246" Height="17" FontId="3">CURRENT VERSION</Text>
<Text X="11" Y="-73" Width="246" Height="17" FontId="3">Version to be installed:</Text>
<Text X="11" Y="-73" Width="246" Height="17" FontId="3">#(loc.InstallVersion)</Text>
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>

This succesfully displays the version which will be installed. But i want to display the current version aswell.

My installer writes the version into the registry and the ini file. This has to be done as the software uses the ini file aswell.

So my question is:
How do I read an ini value with the WiX Bootstrapper(Burn)?


You can write your own CustomAction library (in C++ or .NET) that will read the .ini file, parse it and provide new properties to MSI engine.

If you must customize Burn bootstrapper and cannot do it using CustomAction in MSI, you must create your own Boostrapper Application using WiX BA SDK.