Avatar of gloyola1
gloyola1
Flag for United States of America asked on

How to write a simple batch file

I need a batch file to run the following from the command prompt:  wmic computersystem get model,name,manufacturer,systemtype

This batch file is for Windows 7 to get details for inventory that I am gathering.  Thanks
Windows BatchWindows OSWindows 7

Avatar of undefined
Last Comment
Jeremy Weisinger

8/22/2022 - Mon
Bill Prew

What are you going to do with the output, do you want it in any particular format or in a file?  CSV, plain text?


»bp
Bill Prew

You can run that command right from a BAT file as it stands, for example:

@echo off
setlocal

wmic computersystem get model,name,manufacturer,systemtype

Open in new window


»bp
gloyola1

ASKER
Hello, I want the end users that run this to send me back the information thru email.  So, as far as output goes something that will make it easy for them to send back to me in an email.  Thanks
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
gloyola1

ASKER
Yes, cut and paste.  Thanks
SOLUTION
Jeremy Weisinger

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
gloyola1

ASKER
Thanks for the help!
Bill Prew

Welcome, glad that helped.


»bp
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Jeremy Weisinger

Ditto. :)