Putting the Hardware Model in a BGInfo screen should be a built-in field, however for some reason it has been missed.
This script will show the Make and Model of the machine.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
'========================================================================== ' ' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2014 ' ' NAME: HardwareModel.vbs ' ' AUTHOR: Chisholm, Chris - Blue World Enterprises Inc. ' DATE : 4/22/2014 ' ' COMMENT: Used by BGInfo to list the Hardware Model of the Machine ' ' DEPENDENCIES: BGINFO.exe ' '========================================================================== Dim strSystemType, item '***Define Objects Set objNetwork = CreateObject("WScript.Network") '***Get Computer Name strComputerName = objNetwork.ComputerName '*** Connect to this PC's WMI Service Set objWMI = GetObject("winmgmts:\\" & strComputerName & "\root\CIMV2") '*** Query WMI for Hardware Dim colItems : Set colItems = objWMI.ExecQuery("SELECT Vendor, Name FROM Win32_ComputerSystemProduct",,48) For Each item In colItems strSystemType = item.Vendor & " " & item.Name Next If Len(strSystemType) = 0 Then strSystemType = "Not Found in WMI" Echo strSystemType |
Leave a Reply