Archive: OS Version


OS Version
Here's another simple extension dll. This one will give you the version of windows the user is using. Here's an example of how you call it:

File /oname=$TEMP\nsisos.dll nsisos.dll
CallInstDLL $TEMP\nsisos.dll osversion
MessageBox MB_OK "Major Version: $0 $\nMinor Version: $1"
The major version is returned to $0 and the minor version is returned to $1. Here's a table of how to interpret the results:

Major Version:
Windows 95 4
Windows 98 4
Windows Me 4
Windows NT 3.51 3
Windows NT 4.0 4
Windows 2000 5
Windows XP 5
Windows .NET Server 5

Minor Version
Windows 95 0
Windows 98 10
Windows Me 90
Windows NT 3.51 51
Windows NT 4.0 0
Windows 2000 0
Windows XP 1
Windows .NET Server 1

Rob

I've added another method called osplatform that will return a platform string. Possible values are: "win31", "win9x", "winnt", or "unknown".

I've attached the updated dll and source.