jrsoftware.org // Jordan Russell's Software
-Home

Products

-Inno Setup


-Toolbar2000

-Toolbar97

-StripReloc

-More...

Support

-Newsgroups

-Contact Me

#######
visitors since
Jan. 1998

Inno Setup Knowledge Base
Return to index

FAQ: Why must I specify 5.01 instead 5.1 to detect Windows XP?

Article Created: 2003-11-03 20:53 GMT by Jordan Russell
Last Updated: 2010-05-17 04:57 GMT by Jordan Russell


UPDATE: This information is outdated. In Inno Setup 5.3.8 and later, 5.01 and 5.1 are equivalent.

Because Windows XP's GetVersionEx function returns 1 in the dwMinorVersion field.

In all versions of Windows prior to Windows XP, the dwMinorVersion field (and before that, the minor version returned by GetVersion) was expressed in hundredths of a major version, not tenths. For example, Windows 3.1 returned 10 as its minor version number, and Windows NT 3.5 returned 50.

Since Inno Setup predates Windows XP, it assumes that by .1 you mean minor version 10. You must instead use .01 to specify minor version 1.


Site contents Copyright © 1997-2012 Jordan Russell. All rights reserved.