blog.marccus.net

Live. Life is Wonderful.





Batch file: Gather PC info

 

Here’s a simple way to help generate pc information and store it as text file at the same directory level.

Open up a Notepad and insert the code below, save it as .bat extension file.


@echo off

start /wait msinfo32.exe /report pcinfo.txt

del "%~f0" & exit

The last line is to enable the batch file to delete itself after generate the text file.

So when double click on the .bat file, it will open up a command prompt to execute the command msinfo32.exe and store all the info into pcinfo.txt. If you want the text file to save as another name, simply change the pcinfo.txt to the name your desired.





written by marccus.   category: Tech Tips.   Total 106 views    

 



Thanks for your reply!
谢谢你的留言



Email subscription



Share this Post


Email subscription