How do I know which version of Windows I am running?

asked 14 Sep '11, 04:06

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%


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.

link

answered 14 Sep '11, 04:10

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×176
×27
×5

Asked: 14 Sep '11, 04:06

Seen: 1,768 times

Last updated: 15 Sep '11, 05:17