FAQ's - APPX Software, Inc. : APPX Utility : APPX System Administration :
Which Windows version are we? | |
A client needs to intercept the Operating System type in Appx. The subroutine "GET OS TYPE" returns the type of OS (Unix, Windows) but is there another subroutine to get the type of Windows OS (WIN 95, 98, 2000, NT, XP) ?
Here's one way:
NT, 2000, and XP all set the OS environment variable OS=Windows_NT If OS is set, then your operating system is NT, 2000, or XP Here's another way: Define a DOMAIN called DWORD, numeric, 10.0 digits, signed, storage-type = binary. (This is important, it must be exactly that format). Define a one-record working storage file (I called mine 1EX VERSION) with the following structure (note - each DOMAIN field is defined by the DWORD domain):
Seq No Field Name Field Type Format ======= =================== ========== ====================== 100 VERSION SIZE DOMAIN S9(10) 200 VERSION MAJOR DOMAIN S9(10) 300 VERSION MINOR DOMAIN S9(10) 400 VERSION BUILD DOMAIN S9(10) 500 VERSION PLATFORM DOMAIN S9(10) 600 VERSION CSD ALPHA X(128) The following ILF should populate the VERSION record for you:
SET --- TEMP 80 = kernel32.dll, APPEND --- TEMP 80 0 GetVersionExA * SET 1EX VERSION SIZE = 148 PASS 1EX VERSION RECORD SHARE? Y CALL --- TEMP 80 RESIDENT? N END? N FAIL 0 If --- RETURN CODE is not equal to 0, the VERSION record should be filled in.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_49iw.asp (all one URL) has more information about the GetVersionEx function and the contents of the OSVERSIONINFO structure.
| |
[Append to This Answer] | |
2004-Jan-05 5:19pm |
Previous: | Can I reserve an application lock? |
Next: | Message; “Invalid Native File Management System” |
|