Page 1 of 1 1
Topic Options
#39429 - 2003-04-22 09:44 PM How to detect Win2k Server vs. Professional?
crive Offline
Lurker

Registered: 2003-04-22
Posts: 1
Loc: US
Hi all

How can I detect if a workstation (PC) is running Win2k Server or Professional? I am using Kixstart version 3.60 .

THANKS!!!!

crive

Top
#39430 - 2003-04-22 09:46 PM Re: How to detect Win2k Server vs. Professional?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Try looking at the value: ProductName in key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#39431 - 2003-04-22 09:46 PM Re: How to detect Win2k Server vs. Professional?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
crive,

Welcome to the board!

Try this..
os.kix

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#39432 - 2003-04-22 09:51 PM Re: How to detect Win2k Server vs. Professional?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
if you have the option to do so, upgrade to kix ver 4.12 or 4.20

there have been a GREAT number of improvements over the version you have.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#39433 - 2003-04-22 10:15 PM Re: How to detect Win2k Server vs. Professional?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello Crive and Welcome to the board. KORG

For v3.6x the link Kent gave you is probably the best script for OS detection.

If you just want to determine if SERVER or not and don't care about the version you could do something like this.



IF @INWIN = 1
  $SRVR = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions""ProductType")
    IF $SRVR<>"WinNT"    ; System is not a Workstation so assume it is a Server
      QUIT ; or do what ever else you want to do
    ENDIF
ENDIF


Top
#39434 - 2003-04-22 10:32 PM Re: How to detect Win2k Server vs. Professional?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Definitely time to upgrade to KiXtart 4.20 and use the OSID() - Identifies operating system, service pack level, and OS kernel UDF.
_________________________
There are two types of vessels, submarines and targets.

Top
#39435 - 2003-04-22 11:21 PM Re: How to detect Win2k Server vs. Professional?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Jens,

OSID() now seems to work pretty good.

Only thing I ran into was this, but I guess it is correct since my system was not built in that manner.

This key does not exist in my Registry
$os_oem=readvalue('HKEY_LOCAL_MACHINE\System\Setup','OemDuplicatorString')

Where did you find/learn about this string?

Microsoft, and major search engines don't show it.

Top
#39436 - 2003-04-22 11:42 PM Re: How to detect Win2k Server vs. Professional?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As described in the OSID header, OemDuplicatorString is only set when using a SYSPREP installation. The SYSPREP .INF file allows you to set an identifier for your installation image, which will be written into OemDuplicatorString. Otherwise, it'll be nonexistent and thus the appropriate array element should be empty.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 384 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.134 seconds in which 0.071 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org