Page 1 of 1 1
Topic Options
#32515 - 2002-11-15 11:58 AM how to determine NT / W2k OS Service Pack level ?
elaintarha Offline
Lurker

Registered: 2002-11-14
Posts: 2
Loc: helsinki
Can someone help me? I would need to determine NT / W2k service pack level from somewhere with my script.. from registry? with some command line tool?

I tried winmsd /f, it created file and I could find the string from there but registry sounds easier if I just could find it somewhere..

thanks
timo

Top
#32516 - 2002-11-16 12:09 AM Re: how to determine NT / W2k OS Service Pack level ?
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Elaintarha,

Welcome to the board !

If you use KiX 2001 you could try it with OSID()

hth

Jochen
_________________________



Top
#32517 - 2002-11-16 12:16 AM Re: how to determine NT / W2k OS Service Pack level ?
elaintarha Offline
Lurker

Registered: 2002-11-14
Posts: 2
Loc: helsinki
thanks jpols for fast answer!

So SP level can be found from:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\CSDVersion\

thanks again
timo

Top
#32518 - 2002-11-16 12:30 AM Re: how to determine NT / W2k OS Service Pack level ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mitäs timo?
joko siel helsingissä on talvi?

I quess you are the first fin I see here posting...
well, when I exclude myself.

about that sp level, there will be no value if no sp installed so that condition should be checked too.

cheers
_________________________
!

download KiXnet

Top
#32519 - 2002-11-16 12:31 AM Re: how to determine NT / W2k OS Service Pack level ?
Vig Offline
Starting to like KiXtart

Registered: 2001-11-14
Posts: 166
Loc: Saudi Arabia
I forget which version this was implemented in but @CSD will tell you the service pack level.

From the manual
quote:
@CSD CSD information (e.g.: “Service Pack 1”)

Top
#32520 - 2002-11-15 01:27 PM Re: how to determine NT / W2k OS Service Pack level ?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it was in kix2001 beta1 (weirdly scriptlogic's dev report does not have it listed)
_________________________
!

download KiXnet

Top
#32521 - 2002-12-08 08:22 PM Re: how to determine NT / W2k OS Service Pack level ?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

For people not using KiXtart 4.x see our script os.kix on our site.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#32522 - 2003-01-10 10:17 AM Re: how to determine NT / W2k OS Service Pack level ?
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
I use this (very) primative piece ... that will scan my users upon logon and tell me if it is less than SP6 ... maybe adapt?
code:
 $SP6A = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\Q246009","Comments")
If $SP6A <> "Windows NT 4.0 Hotfix: Service Pack 6 Re-release" shell "cmd /c net send aminidm %computername% old Service Pack here"

_________________________
If not for the last minute ... nothing would get done ...

Top
#32523 - 2003-01-10 02:54 PM Re: how to determine NT / W2k OS Service Pack level ?
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
If you're into WMI you can try this also...
code:
? "Service Pack "+WMIQuery("CSDVersion","Win32_OperatingSystem")

_________________________
We all live in a Yellow Subroutine...

Top
#32524 - 2003-01-10 03:46 PM Re: how to determine NT / W2k OS Service Pack level ?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
However, the preferred way would be to use the @CSD macro as it is native KiXtart.

BTW, my personal preferences:
1) Native KiXtart command/function/macor
2) Registry read
3) WMI or ADSI
4) other standard COM DLL
5) external DLLs
6) other standard executables
7) external executables

A standard DLL/executable is defined as a fiel that is present in the default build of all computer that are running the particular script

External DLLs/executables are files that need to be installed specifically on computers

Non-native solutions should preferably be implemented via UDFs.
_________________________
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 1257 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.032 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