MSI Compatibility: Lying about VersionNT and ServicePackLevel

MSI 5 on Windows 7 introduces a new application compatibility setting, as Chris Jackson describes in his blog.

To work around too strict OS version checks in LaunchConditions, Windows Installer can automatically try several variations of values for the VersionNT and ServicePackLevel properties to circumvent the condition. For instance it will start with VersionNT=600 (Windows Vista) and ServicePackLevel=14, then count down the SP level (13, 12, …, 0), then repeat the same with VersionNT=502 (Windows Server 2003) and so on, until the LaunchCondition succeeds. This is a per-msi setting on the local machine, which can be turned on using this dialog:

msiappcompat

According to the blog, Windows Installer also sets these properties which might be useful to detect that version lying is going on:

  • SHIMFLAGS
  • SHIMVERSIONNT
  • SHIMSERVICEPACKLEVEL

As far as I know these properties are currently not documented in MSDN.

Original article:
Unraveling the Mysteries of MSI Compatibility Modes in Windows 7

Published Sat, Jul 4 2009 12:39 by stefan