Query a Registry Key for Bulk Computers

Query a Registry Key for Bulk Computers

On Error Resume Next
Set objShell = CreateObject("Wscript.Shell")
Set oFso = CreateObject("Scripting.FileSystemObject")
sDesktop = objShell.SpecialFolders("Desktop")
spath = sDesktop & "\Dclist.txt"
Set oT = oFso.OpenTextFile(spath,1)
Do Until oT.AtEndofStream
temp= oT.ReadLine()
strComputer = Trim(temp)

Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002


Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")

strKeyPath = "Hardware\DESCRIPTION\SYSTEM\BIOS\"
strValueName = "SystemManufacturer"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "OS Architecture for" & " " & strComputer & " " & "is: " & strValue
Loop
Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 3. Comment: Removed (en-US) from title, modified title, added tag

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Richard Mueller edited Revision 3. Comment: Removed (en-US) from title, modified title, added tag

Page 1 of 1 (1 items)