Computing.Net > Forums > Programming > systeminfo batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

systeminfo batch file

Reply to Message Icon

Name: wilder1926
Date: February 21, 2009 at 06:49:42 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hello,

I would like to create a batch file that will give me the systeminfo.

How can I do that.

By the way, do you know if PowerBatch software is good?
His there a better software?

Thanks for you help.

JM



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: February 22, 2009 at 02:21:31 Pacific
Reply:

There are two things you may want to have a look into.

1. There is a utility in xp pro called systeminfo.exe it can give some useful info for /f and find can finish it off if required. You can invoke it both from the command line and from a cmd script. You can supress the progress messages using "systeminfo 2>nul". If your using xp home systeminfo.exe isn't present but does work if you can find a copy(google...), then either put it in either a path directory (like %systemroot%\system32) or in the same directory of the script.

2. Msinfo32 - This primarily a gui tool included with windows but has a few command line switches that can be useful. It can't print to the console but can generate reports and in xp it can even generate partial reports(unfortunately not so for vista....).

It can be a little tricky to use as the basic help is very basic ("%commonprogramfiles%\Microsoft Shared\MSInfo\msinfo32.exe" /?) the quotes are important as %commonprogramfiles% almost always will contain a space.

A few things to rember with msinfo32:

->As msinfo32 does not reside in a %path% listed directory you will probably have to specify the full path ("%commonprogramfiles%\Microsoft Shared\MSInfo\msinfo32.exe") whenever you use it.

->You must use global names for categories (swenv vs software enviroment) use "%commonprogramfiles%\Microsoft Shared\MSInfo\msinfo32.exe" /showcategories to see the global names.

->If your specifying categories rather that running a full report use /categories even if you only want one the /category switch has a different use. You can either prefix a + to include a category or - to exclude it "/categories +category1+cat2-cat3"

->Msinfo32 will not write to the console you need to use the /report to save to a text file then run a for /f loop over it. Also be aware that the text file will be unicode and not plain text, if you want to convert it to plain text using type, "type unicode.txt > plain.txt"


You may need to do some searching to figure it out...

There are also a lot of other good system information utilities out there like psinfo and compinfo to name a few depending on what you need.


0

Response Number 2
Name: wilder1926
Date: February 22, 2009 at 06:18:18 Pacific
Reply:

thanks for all the informations.

JM


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: systeminfo batch file

Batch file to count a specific character in a www.computing.net/answers/programming/batch-file-to-count-a-specific-character-in-a/19751.html

FTP batch file www.computing.net/answers/programming/ftp-batch-file/9027.html

batch file www.computing.net/answers/programming/batch-file/13936.html