Solved

VBScript to return system model

Posted on 2010-11-09
2
578 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:jamorlando
2 Comments
 
LVL 7

Accepted Solution

by:
rogerard earned 400 total points
ID: 34096244
Here you go..  throws in s/n also.  http://www.developerscloset.com/?p=247
0
 

Author Comment

by:jamorlando
ID: 34096283
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Batch/VBScript : Disable Windows tasks 7 40
excel 2016 program to loop through scripts 6 38
Restart service script 5 13
Collapse and expand table in Word 2010 2 29
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question