Solved

VBScript to return system model

Posted on 2010-11-09
2
552 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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 …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now