Determine Os In Vbscript?
Is there a way to tell using VBScipting if the computer it's running on is XP or Windows7?
thanks,
Valerie
0
-
A quick Google search on getting the Windows version number in VBS gave me the below example code:
Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime") strComputer = "." Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set oss = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") For Each os in oss value = "Version: " & os.Version NextIt seems to do the trick. The below link gives the full name to what each version of Windows is:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
0
Please sign in to leave a comment.
Comments
1 comment