1
votes

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>
</Page>

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)?

2
You will probably have to author your own (or edit wixstdba) bootstrapperapplication to read through the ini file and set variables or write your own Extention for reading ini files. Maybe someone already wrote an extension? - Brian Sutherland

2 Answers

1
votes

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.

1
votes

As you have a registry value, use RegistrySearch to read the registry value into a variable and then [VariableName] to display the value. Burn doesn't support reading .ini files directly.