SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
how to get Windows version

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
how to get Windows version
Author Message
Davy Beeckmans



Joined: 15 Sep 2003
Posts: 2

Post how to get Windows version Reply with quote

hello

Is there a quick way using JAL or VBscript to get
the windows version running on a remote agent ?

I'm trying to install a security patch but it depends
on the windows version installed which one I have
to install ..

thank you

Mon Sep 15, 2003 5:42 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: how to get Windows version Reply with quote

This infor can be read from the registry

Os type (NT, 2000, etc...):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName

OS version:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion

Build #:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber

Service pack #:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion

In a JAL you can use something like

Dim( ServicePackName, string )
Dim( ServicePackNo, Number )
RegistryGetKey( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", &
"CSDVersion", "STRING", ServicePackName )
Mid( ServicePackName, 14, 2, ServicePackNo)

Similarly you can read other version numbers.

To return this information back to calling machine
Copy results to a global variable or file which you can transfer back to the caller or save on a network shared drive.

: hello

: Is there a quick way using JAL or VBscript to get
: the windows version running on a remote agent ?

: I'm trying to install a security patch but it depends
: on the windows version installed which one I have
: to install ..

: thank you

Mon Sep 15, 2003 8:40 am View user's profile Send private message
Davy Beeckmans



Joined: 15 Sep 2003
Posts: 2

Post Re: how to get Windows version Reply with quote

thx sysop ! A great answer as always !

: This infor can be read from the registry

: Os type (NT, 2000, etc...): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
: NT\CurrentVersion\ProductName

: OS version: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
: NT\CurrentVersion\CurrentVersion

: Build #: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
: NT\CurrentVersion\CurrentBuildNumber

: Service pack #: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
: NT\CurrentVersion\CSDVersion

: In a JAL you can use something like

: Dim( ServicePackName, string )
: Dim( ServicePackNo, Number )
: RegistryGetKey( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows
: NT\\CurrentVersion", &
: "CSDVersion", "STRING", ServicePackName )
: Mid( ServicePackName, 14, 2, ServicePackNo)

: Similarly you can read other version numbers.

: To return this information back to calling machine
: Copy results to a global variable or file which you can transfer back to the
: caller or save on a network shared drive.

Mon Sep 15, 2003 9:22 am View user's profile Send private message
Ernie Gallagher



Joined: 07 Jul 2004
Posts: 1

Post Re: how to get Windows version Reply with quote

>> : thx sysop ! A great answer as always !

Not really. I have several NT boxes and the ProductName value does not exist !!!

Wed Jul 07, 2004 7:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: how to get Windows version Reply with quote

Here is the hard way: http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q213267&GSSNB=1#2

To run this create a VBScript job in 24x7 or external VBS file. Run it and save the version number in some text file, registry, global variable or other place which can be then referenced in other jobs

: Not really. I have several NT boxes and the ProductName value does not exist
: !!!

Wed Jul 07, 2004 9:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: how to get Windows version Reply with quote

Just to let you know that recent versions of 24x7 have @V"winver" macro variable returning system type, version and service pack number

: Here is the hard way:
: http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q213267&GSSNB=1#2

: To run this create a VBScript job in 24x7 or external VBS file. Run it and
: save the version number in some text file, registry, global variable or
: other place which can be then referenced in other jobs

Sat Oct 30, 2004 10:39 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.