On Error Resume Next Dim strComputer strComputer = InputBox("Enter the name of the computer:") Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure") For Each objSMBIOS in colSMBIOS MsgBox strComputer & ": " & objSMBIOS.SerialNumber Next
On Error Resume Next
BalasPadamDim strComputer
strComputer = InputBox("Enter the name of the computer:")
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
MsgBox strComputer & ": " & objSMBIOS.SerialNumber
Next