Today I would like to talk about a predefined Bootstrapper property, VersionMSI. The VersionMSI property contains the current, installed version of Windows Installer. (Even if you just upgraded.) This property is not saved in any way and is obtained 'fresh' every time it is used.
The value is obtained as follows:
- Open the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Installer
- Get the directory name where the current version of Windows Installer is from the InstallerLocation key
- Verify that the file msi.dll exists in that folder
- Open the DLL and return its file version
If you look at the package.xml manifest for the .Net Framework you will notice that the Windows Installer dependency is declared using this property.