I saw Ivo Beerens’ blog post about using BGInfo and VMware View: Display the protocol used on the VMware View desktop background and it made me think of some of the scripts I’ve used. I figured I would share them.
I’ve used BGInfo for years, and have collected several scripts that I have used for various pieces of info that isn’t always the easiest to get from either the Windows registry or other places. When I worked for a Service Provider, it wasn’t uncommon to have systems spread across different Windows versions, multiple time zones, 64 or 32 bit, etc.
Here are some of the scripts I regularly used when I was an Administrator.
System Type – Displays the Hardware Manufacturer & Model Type
Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 '*** Connect to this PC's WMI Service Set objWMI = GetObject("winmgmts:\\.\root\CIMV2") '*** Query WMI for Hardware Set items = objWMI.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", _ "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each item In items strSystemType = item.Vendor & " " & item.Name 'What we're after Next If Len(strSystemType) = 0 Then strSystemType = "Not Found in WMI" echo strSystemType