dhmehrotra
Programmer
Hi,
I am a beginner at VBScript. So, if my question seems stupid - please excuse
Anyhow, what I'm trying to do is to get the Operating System (Windows) product ID of all the computers on our domain.
I looked at certain examples to see how I can get it for my local machine-
Set ws = WScript.CreateObject("WScript.Shell"
v = ws.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId"
WScript.Echo v
and I looked at certain examples online to see how network information can be gathered-
On Error Resume Next
Set prov = GetObject("WinNT:"
For each dom in prov
For each o in dom
If o.Class = "Computer" Then
WScript.Echo o.Class & o.Name & " \n" & " Owner: " & wner
WScript.Echo " Division: " & o.Division
WScript.Echo " OperatingSystem: " & peratingSystem
WScript.Echo " OS Version: " & peratingSystemVersion
WScript.Echo " Processor: " & o.Processor
WScript.Echo " ProcessorCount: " & o.ProcessorCount
End if
Next
Next
But I am clueless, how I can merge both the above objectives to get the Product ID (from the registry) of all the systems on our domain.
Hope someone can help.
Thanks,
Dhruv
I am a beginner at VBScript. So, if my question seems stupid - please excuse
Anyhow, what I'm trying to do is to get the Operating System (Windows) product ID of all the computers on our domain.
I looked at certain examples to see how I can get it for my local machine-
Set ws = WScript.CreateObject("WScript.Shell"
v = ws.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId"
WScript.Echo v
and I looked at certain examples online to see how network information can be gathered-
On Error Resume Next
Set prov = GetObject("WinNT:"
For each dom in prov
For each o in dom
If o.Class = "Computer" Then
WScript.Echo o.Class & o.Name & " \n" & " Owner: " & wner
WScript.Echo " Division: " & o.Division
WScript.Echo " OperatingSystem: " & peratingSystem
WScript.Echo " OS Version: " & peratingSystemVersion
WScript.Echo " Processor: " & o.Processor
WScript.Echo " ProcessorCount: " & o.ProcessorCount
End if
Next
Next
But I am clueless, how I can merge both the above objectives to get the Product ID (from the registry) of all the systems on our domain.
Hope someone can help.
Thanks,
Dhruv