VBScript to return system model

Hi,
I need a quick VBScript to take the systeminfo command from command prompt, and return the value of the "System Model: " field.

Thanks,
Jamie
jamorlandoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
rogerardConnect With a Mentor Commented:
Here you go..  throws in s/n also.  http://www.developerscloset.com/?p=247
0
 
jamorlandoAuthor Commented:
Perfect.  Trimmed down the script to this for my needs.  I'm going to be using this for my BGInfo desktop wallpaper utility.  Thanks!

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
    Wscript.Echo objComputer.Model
Next
0
All Courses

From novice to tech pro — start learning today.