Checking Your OS Version
DllGetVersion ( a u -- major minor build)
Puts three values on stack (major, minor and build) which you can use to retrieve the full version number of specified dll. (This word will work only if dll support versioning).
GET-VER ( -- minor major platform)
Puts three values on stack:
Value | Meaning |
1 | Windows9*/ME |
2 | WinNT/2000/XP |
Value | Meaning |
3 | Windows NT 3.51 |
4 | Windows 95 |
4 | Windows 98 |
4 | Windows ME |
4 | Windows NT 4.0 |
5 | Windows 2000 |
5 | Windows XP |
5 | Windows .NET Server |
Value | Meaning |
51 | Windows NT 3.51 |
0 | Windows 95 |
10 | Windows 98 |
90 | Windows ME |
0 | Windows NT 4.0 |
0 | Windows 2000 |
1 | Windows XP |
2 | Windows .NET Server |
With these values, you can retrieve the full version number of OS installed on your computer.
Example:
#( test_win_version NoActive 0 VALUE ver_minor 0 VALUE ver_major 0 VALUE ver_platform : platform ver_platform 2 = IF ver_major 4 = IF S" NT" ELSE ver_minor 0 = IF S" 2000" ELSE S" XP" THEN THEN ELSE S" 9x" THEN ; Action: GET-VER TO ver_platform TO ver_major TO ver_minor MSG: "Windows %platform% %ver_major%.%ver_minor% )#
Returns TRUE (-1) if nnCron has been started in Win2000 or WinXP, and returns FALSE (0), if it is run in Win9x/ME/NT.
Win95?
Win98?
WinME?
WinXP?
Win2003?
Returns TRUE (-1) if nnCron has been started in Win95, Win98, WinME, WinXP or Win2003 respectively .
Returns TRUE (-1) if nnCron has been started in Win9x or WinME, and returns FALSE (0), if it is run in WinNT/2000/XP.
Returns TRUE (-1) if nnCron has been started in WinNT/2000/XP, and returns FALSE (0), if it is run in Win9x/ME.
Puts on stack a numeric value of Windows version.
Value | Meaning |
3 | Windows NT 3.51 |
4 | Windows 95 |
4 | Windows 98 |
4 | Windows ME |
4 | Windows NT 4.0 |
5 | Windows 2000 |
5 | Windows XP |
5 | Windows .NET Server |
WinVerBuild ( --
n)
WinVerMajor ( -- n)
WinVerMinor ( -- n)
WinVerPlatform ( -- n)
Gets the system values (build, major, minor and platform) which you can use to retrieve the full version number of OS installed on your computer. See descriptions of these values.
Returns the string with the name of the currently installed service pack in your operating system.
Example:
\ printing installed service pack name to console WinVerServicePack TYPE CR
Returns the string with the full version of your operating system (OS name, build number and service packs installed).
Example:
MSG: "%WinVersionString%"