March 30, 2016

To get system details through a bat file

How to get all system details to text file

Last week i was informed by I T section kozhikode  +bithesh soubhagya  to develop a software to track the hardware and software details of old working system in kozhikode region to create a hardware register.


Here i am writing a code that can generate a text file with all needed system information. This can be used for diagnosis system issues. To find the serial number and model number of the system, the user details, the software details, medium access control address, ip configuration details, system information, routing table details, product details etc ... If you are looking for a tutorial about commands in operating system , just follow the link given below.

just copy and the paste the following code to a text file then save the file with an extension .bat

BAT FILE CREATION



MKDIR D:\ITDiagnosis
if not exist D:\ITDiagnosis\diagnosis.txt dir > D:\ITDiagnosis\diagnosis.txt
echo cfed tool run on %date% >> D:\ITDiagnosis\diagnosis.txt
wmic bios get serialnumber >> D:\ITDiagnosis\diagnosis.txt
wmic computersystem get model >> D:\ITDiagnosis\diagnosis.txt
echo checking units network issue >> D:\ITDiagnosis\diagnosis.txt
echo ===================== >> D:\ITDiagnosis\diagnosis.txt
net view >> D:\ITDiagnosis\diagnosis.txt

echo checking your internet >> D:\ITDiagnosis\diagnosis.txt
echo ================>> D:\ITDiagnosis\diagnosis.txt
ping www.google.co.in >> D:\ITDiagnosis\diagnosis.txt

echo checking ro ftp connection >> D:\ITDiagnosis\diagnosis.txt
echo ===================>> D:\ITDiagnosis\diagnosis.txt
ping 117.218.68.154 >> D:\ITDiagnosis\diagnosis.txt


echo ip address details >> D:\ITDiagnosis\diagnosis.txt
echo =============>> D:\ITDiagnosis\diagnosis.txt
ipconfig /all >> D:\ITDiagnosis\diagnosis.txt

getmac >> D:\ITDiagnosis\diagnosis.txt

echo Routing table >> D:\ITDiagnosis\diagnosis.txt
echo =========>> D:\ITDiagnosis\diagnosis.txt
route print >> D:\ITDiagnosis\diagnosis.txt


echo System Informations >> D:\ITDiagnosis\diagnosis.txt
echo ===============>> D:\ITDiagnosis\diagnosis.txt
systeminfo >> D:\ITDiagnosis\diagnosis.txt

echo User details >> D:\ITDiagnosis\diagnosis.txt
echo ===============>> D:\ITDiagnosis\diagnosis.txt
net user >> D:\ITDiagnosis\diagnosis.txt
wmic useraccount list brief >> D:\ITDiagnosis\diagnosis.txt

if not exist D:\ITDiagnosis\swlist.txt dir > D:\ITDiagnosis\swlist.txt
wmic product >> D:\ITDiagnosis\swlist.txt

echo The code is written by belazy.blogspot.in   >> D:\ITDiagnosis\diagnosis.txt


writing to a file










How to create a bat file ?

you can follow this link

windows commands

Similar posts

compare two strings using command prompt



Thanks to +Shimjith Kumar

Author : +belazy


The application is developed for consumerfed kozhikode region (for  +bithesh soubhagya )


http://javabelazy.blogspot.in/

No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments