VBscripting
Not sure if anyone knows much about this but thought id ask anyway as the microsoft guys havent emailed me back.
I have written a VBscript to scan all the computers on my network for all the hardware information. It works fine when windows firewall is off but will not work when it is on.
What port should i open?
heres a small bit of the code of the code ---
objFile.Write " "
For i = 0 to UBound(arrComputers)
objExplorer.Document.Body.All.ComputerList.Rows(i).bgColor = "yellow"
strComputer = arrComputers(i)
Set objWMIService = GetObject("winmgmts:\\" & strComputer)
If Err = 0 Then
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objCS In colCSes
objFile.Write objCS.Name & "," & """" & objCS.Manufacturer & """" & "," & objCS.Model & _
"," & int(objCS.TotalPhysicalMemory / Bytes_Mega) & " MB" & ","
Next
Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor Where DeviceID = 'CPU0' ")
For Each objProcessor in colProcessors
objFile.Write objProcessor.Name & "," & objProcessor.DataWidth & " bit" & "," & _
objProcessor.MaxClockSpeed & " MHz" & ","
Next
Not sure if anyone knows much about this but thought id ask anyway as the microsoft guys havent emailed me back.
I have written a VBscript to scan all the computers on my network for all the hardware information. It works fine when windows firewall is off but will not work when it is on.
What port should i open?
heres a small bit of the code of the code ---
objFile.Write " "
For i = 0 to UBound(arrComputers)
objExplorer.Document.Body.All.ComputerList.Rows(i).bgColor = "yellow"
strComputer = arrComputers(i)
Set objWMIService = GetObject("winmgmts:\\" & strComputer)
If Err = 0 Then
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objCS In colCSes
objFile.Write objCS.Name & "," & """" & objCS.Manufacturer & """" & "," & objCS.Model & _
"," & int(objCS.TotalPhysicalMemory / Bytes_Mega) & " MB" & ","
Next
Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor Where DeviceID = 'CPU0' ")
For Each objProcessor in colProcessors
objFile.Write objProcessor.Name & "," & objProcessor.DataWidth & " bit" & "," & _
objProcessor.MaxClockSpeed & " MHz" & ","
Next
Last edited: