Script One :
Script Two :Code:Dim objWMIService Dim colItems strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48) For Each objItem in colItems msgbox "IdentifyingNumber: " & objItem.IdentifyingNumber & vbcrlf & _ "Name: " & objItem.Name & vbcrlf & _ "Vendor: " & objItem.Vendor & vbcrlf & _ "Version: " & objItem.Version Next
If someone can post back with results of each one ( one from a Lenovo machine and one from a dell machine )Code:Dim objWMIService Dim colItems1, manu, model strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems1 = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48) For Each Item In colItems1 manu = Item.Manufacturer model = Item.Model Next msgbox manu & vbcrlf & model
The thing I am interested in finding out is between the two which one uses the numerical model number ie 7514A87 ( for an M58 ) vs which one comes back with the string model ie actual model name ie M58 or D630 etc ??
Basically just trying to refine my script and need to know which way is the better way of getting the information I am after.


LinkBack URL
About LinkBacks



