PDA

View Full Version : System.GetOSName questions


StealthFD
04-28-2004, 09:00 AM
Greetings,

I am just getting started with AMS5.0 and I have a few quick questions about the System.GetOSName function.

According to the help file, this is the list of possible returns from this function:
Windows XP
Windows Server 2003
Windows 2000
Windows NT 4
Windows NT 3
Windows ME
Windows 98
Windows 95

My questions are:

#1. How can I detect Windows NT 4 Workstation vs. Windows NT 4.0 Server or Windows NT 4.0 Terminal Server Edition?

#2. How can I detect Windows 2000 Professional vs. Windows 2000 Server?

#3. How can I detect Windows XP Professional vs. Windows XP Home or Windows XP Tablet PC Edition?

Any help would be greatly appreciated!

Adam
04-28-2004, 02:51 PM
StealthFD,

The specifics of an OS version would have to be pulled from the registry using one of our built in registry actions. You could then set a variable according to the returned result.

I am not sure where in the resistry these values are located as it can differ from OS to OS.

Perhaps you could find some information on the XPHome vs XPPro by using the search feature of these forums.

Adam Kapilik

StealthFD
04-28-2004, 02:54 PM
OK, thanks... I'm off to learn about Registry.DoesKeyExist now!

SUF6NEWBIE
04-28-2004, 07:48 PM
To help out a little..
for the Win2000, Server 2000, WinXP and Server2003 Product Families

when the Os is installed a file named 'prodspec.ini' is installed to the
root of the system32\ directory on users system.
to date, this file is never altered by service packs or hotfixes etc.
so at this point in time it can be treated as a 'required system
file constant'.

eg: contents of this file for Windows Server 2003 Enterprise Edition:

;
;Note to user: DO NOT ALTER OR DELETE THIS FILE.
;
[SMS Inventory Identification]
Version=1.0

[Product Specification]
Product=Windows Server 2003, Enterprise Edition

Version=5.0
Localization=English
ServicePackNumber=0
BitVersion=40
[Version]
DriverVer=10/01/2002,5.2.3790.0


end of example..

the 'key ini section to read is the [Product Specification]
and the 'value to read is the Product and its returned result.

you can use the ini file actions to return the result of this ,value
and then use 'string actions' if you wish to search or filter specific
'words of text. eg: Windows 2000
Windows 2000 Professional
Windows 2000 Server
Windows 2000 Advanced Server
Windows XP Home
Windows XP Professional
Windows XP Media Center
Windows XP PC Tablet Edition
Windows Server 2003 Web Edition

as a rule of thumb the 'marketed product name for the Os.. is what
should exist in the 'value Product mentioned above..
This is proving to be a reilable method to determine specific Os 'type'
and does not rely on registry entries...

..experiment and create actions or 'function that does the find string
or search for specific key words etc
for you, once you get into AMS5 ...hope helps you out..
usage tip: None of the other entries in 'prodspec.ini' should ever be used
to help determine the 'product version'..use the AMS5 builtin SystemInfo...
and registry actions etc..as advised by ADAM..

SUF6NEWBIE
04-29-2004, 12:05 AM
addition.. if rumours come to fruition.. I'll be adding these to my codes:

Windows XP Professional Second Edition
Windows XP Home Second Edition

..apparently these will be running a modified NT5.2 (server 2003) kernal