Comments

1 comment

  • Avatar
    Jake

    To check informations about the Windows version in which the installer is running you can use the built-in variables below:

    windows_os_name: Windows 95, Windows 98, Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows 2008, Windows 2008 R2, Windows 7
    windows_os_family:Windows 95, Windows NT
    windows_os_family_shortname: win9x, winnt
    windows_os_version_number: 4.0, 4.1, 5.0, 5.1, 5.2, 6.0, 6.1
    windows_os_service_pack: 0 (no Service Pack installed), 1, 2, 3, 4...
    

    The ${windows_os_version_number} variable matches with the OS name following the list below:

    4.0: Windows 95
    4.1: Windows 98
    5.0: Windows 2000
    5.1: Windows XP
    5.2: Windows 2003, Windows XP 64 bits
    6.0: Windows Vista, Windows 2008
    6.1: Windows 7 ,Windows 2008 R2
    

    In addition, a very handy way to execute or not some actions in a particular version is using a <platformTest> rule:

    <throwError>
       <text>Sorry, this application is not compatible with Windows Vista</text>
       <ruleList>
          <platformTest type="windows-vista"/>
       </ruleList>
    </throwError>
    

    You can find the complete list of types for the <platformTest> rule in this article.

Please sign in to leave a comment.