systeminfo batch file

February 21, 2009 at 06:49:42
Specs: Windows XP

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.


See More: systeminfo batch file

Report •

February 22, 2009 at 02:21:31
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.

Report •

February 22, 2009 at 06:18:18
thanks for all the informations.


Report •

Related Solutions

Ask Question