How do I install resources based on the Operating System version?

ImportantThe following article uses options that are available starting with the Professional edition and project type.

A complete installation package should be able to install an application on any version or type of Windows Operating System. Since the application or installation may use different resources or custom actions, you need to condition them based on the OS. This way, the installation package will only install the resources that meet the OS condition.

1. VersionNT

  • VersionNT - this property is set to the version number for the NT operating systems. The values of the VersionNT property are:
  • 601 for Windows 7
  • 602 for Windows 8
  • 603 for Windows 8.1
  • 1000 for Windows 10,

NoteBy default, Windows 10 and Windows 11 set the VersionNT property to 603. But to differentiate from Windows 8.1 all the MSI packages built with Advanced Installer reset its value to 1000 for Windows 10 and 1100 for Windows 11.

2. VersionNT64

VersionNT64 - this property is set to the version number for the operating system only if the system is running on a 64-bit computer (it is empty if the package runs on a non-64 bit computer).

  • VersionNT64 - this property is set to the version number for the x64 operating systems. The values of the VersionNT64 property are:
    • 601 for Windows 7 x64 and Windows Server 2008 R2 x64
    • 602 for Windows 8 x64 and Windows Server 2012 x64
    • 603 for Windows 8.1 x64 and Windows Server 2012 R2 x64
    • 1000 for Windows 10 x64, Windows Server 2016 x64, Windows Server 2019 x64 and Windows Server 2022 x64
    • 1100 for Windows 11 and Windows Server 2025 x64

NoteIf you need to know the exact number of the service pack installed, you can use the ServicePackLevel property. Windows Installer sets this property to the numerical value of the operating system service pack level if one is installed.

3. MsiNTProductType

MsiNTProductType - this property indicates the Windows product type. The values are:

  • 1 for workstations
  • 2 for domain controllers
  • 3 for servers

4. AiArm64

AiArm64 - this property indicates that the OS is running on an ARM64 processor.

This property is set to 1 if ARM64 architecture is detected, otherwise it is empty.

5. Examples of using VersionNT, VersionNT64 and MsiNTProductType properties:

5.1 Install a component or run a custom action based on a specific Windows version

For the installation of a component you can set the Condition field in the Component Properties page to the VersionNT property. The same condition can be set for a custom action in the Expression field of the Custom Action Properties page.

OS32-bit64-bit
Windows 7VersionNT = 601 AND MsiNTProductType = 1VersionNT64 = 601 AND MsiNTProductType = 1
Windows Server 2008 R2-VersionNT64 = 601 AND MsiNTProductType <> 1
Windows 8VersionNT = 601 AND MsiNTProductType = 1VersionNT64 = 601 AND MsiNTProductType = 1
Windows Server 2012-VersionNT64 = 602 AND MsiNTProductType <> 1
Windows 8.1VersionNT = 603 AND MsiNTProductType = 1VersionNT64 = 603 AND MsiNTProductType = 1
Windows Server 2012 R2-VersionNT64 = 603 AND MsiNTProductType <> 1
Windows 10VersionNT = 1000 AND MsNTProductType = 1VersionNT64 = 1000 AND MsiNTProductType = 1
Windows Server 2016-VersionNT64 = 1000 AND MsiNTProductType <> 1 AND WindowsBuild = 14393
Windows Server 2019-VersionNT64 = 1000 AND MsiNTProductType <> 1 AND WindowsBuild = 17763
Windows Server 2022-VersionNT64 = 1000 AND MsiNTProductType <> 1 AND WindowsBuild = 2034
Windows 11-VersionNT64 = 1100 AND MsiNTProductType = 1
Windows Server 2025-VersionNT64 = 1100 AND MsiNTProductType <> 1

5.2 Install a component or run a custom action based on the Windows OS type (32-bit or 64-bit)

This can be done by using the VersionNT64 property in the "Condition" field for a component:

Component Condition

or the "Condition" field from the Execution Stage Conditions of a custom action:

Custom Action Condition

If the component (or custom action) should be installed (or run) only on a 32-bit system, the condition is:

NOT VersionNT64

If the component (or custom action) should be installed (or run) only on a 64-bit system, the condition is:

VersionNT64