Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Or you can use wntServerList to get a list of computers. Then RegConnect to each computer in the list and read the registry contents of some key that might tell you the service pack level. After you get that working for maybe 4 or 5 computers, add code to bullet proof it from computers being turned off, disconnected etc.
AddExtender("WWWNT34i.DLL") ;return a list of all Windows NT (either workstation or server) servers = wntServerList("","",4096) count = ItemCount(servers,@tab) output = "" For xx = 1 to count computer = ItemExtract(xx,servers,@tab) ErrorMode(@off) handle = RegConnect(computer, @REGMACHINE) ErrorMode(@cancel) if handle == 0 err = LastError() errstr = IntControl (34, err, 0, 0, 0) Message(StrCat("Unable to connect to '",computer,"'"),StrCat("Error: ",err," ",errstr)) continue endif subkeystr1 = "SOFTWARE\Microsoft\Windows NT\CurrentVersion[Productname]" subkeystr2 = "SOFTWARE\Microsoft\Windows NT\CurrentVersion[CSDVersion]" if RegExistValue(handle,subkeystr1) then prod = RegQueryValue(handle,subkeystr1) else prod = "*UNKNOWN*" if RegExistValue(handle,subkeystr1) then sp = RegQueryValue(handle,subkeystr2) else sp = "*UNKNOWN*" output = StrCat(output,@crlf,computer,@tab,prod,@tab, sp) Next output = StrSub(output,3,StrLen(output)-2) Message("Service Pack Info",output)
Article ID: W15993
File Created: 2004:03:30:15:42:08
Last Updated: 2004:03:30:15:42:08