Link to home
Create AccountLog in
Avatar of gloyola1
gloyola1Flag 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
Avatar of Bill Prew
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
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
Avatar of 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
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Yes, cut and paste.  Thanks
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks for the help!
Welcome, glad that helped.


»bp
Ditto. :)