Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get os version with vbscript X32 or X64

Status
Not open for further replies.

THEWIPET

Technical User
Jan 16, 2003
3
CA
Hi All..

i need to retriev the OS version from my script. I do it with WMI and got the information. by querying the ("Select * from Win32_OperatingSystem")
The things is the only way i found the make the difference between X32 and X64 is throught this field.

"Caption: " & objOperatingSystem.Caption

this is the result.
Caption: Microsoft(R) Windows(R) Server 2003, Standard X64 Edition

the result are a little bit cheeze cause i have to create another function to grab the X64 out of the caption. Do you have a faster way or i'm stuck with the InStr(test, "X64") function?

Thanks fo you help!
 
You might be stuck with that...but you may also take a look at

Win32_ComputerSystem and the SystemType property....I don't have a 64-bit system to test

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
thanks this one is interesting.. ive test it in my ESX env... i got 2 servers one that is X32 and the other one in X64

X32 result
SystemType: X86-based PC

X64 Resault
SystemType: X64-based PC

i test it on physical machine and got the same result..

thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top