May 6, 2003 #1 Guern Programmer Jun 22, 2001 91 GB Hi, Is there a call to return the OS type i.e. Win95, 98, NT, 2000 etc? Thanks.
May 6, 2003 #2 chmohan Programmer Apr 9, 2003 392 US in .net its done like this http://www.dotnetextreme.com/code/detectosver.asp or this http://www.mvps.org/vbnet/index.html?code/helpers/iswinversion.htm Upvote 0 Downvote
in .net its done like this http://www.dotnetextreme.com/code/detectosver.asp or this http://www.mvps.org/vbnet/index.html?code/helpers/iswinversion.htm
May 6, 2003 Thread starter #3 Guern Programmer Jun 22, 2001 91 GB Hi, Thanks for that. Yes, I can do .net, but this will be wsh on Win95/98 etc. They will not have .net installed. At the moment, the idea I have is to look for certain files, but that's not as reliable as I'd like. Upvote 0 Downvote
Hi, Thanks for that. Yes, I can do .net, but this will be wsh on Win95/98 etc. They will not have .net installed. At the moment, the idea I have is to look for certain files, but that's not as reliable as I'd like.
May 7, 2003 #4 mrmovie Technical User Oct 2, 2002 3,094 GB using WMI strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2" Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem" For Each objOperatingSystem in colOperatingSystems Wscript.Echo objOperatingSystem.Caption & " " & objOperatingSystem.Version Next possibly faster, you can query ExpandEnvirnomentStrings and take a look at COMSPEC, being cmd.exe for w2k, nt etc and command for w9x hope it helps Upvote 0 Downvote
using WMI strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2" Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem" For Each objOperatingSystem in colOperatingSystems Wscript.Echo objOperatingSystem.Caption & " " & objOperatingSystem.Version Next possibly faster, you can query ExpandEnvirnomentStrings and take a look at COMSPEC, being cmd.exe for w2k, nt etc and command for w9x hope it helps