Saturday 11 April 2020

Batch script for getting windows OS name in windows.


Batch script for getting windows OS name in windows.

By using "systeminfo" command we can get the OS information.

Command : systeminfo | find "OS Name".

Batch script: 
1. create batch file "OSName.bat".
2. paste the below code in batch.

systeminfo | find "OS Name"

pause

3. save the file and run it. you can see the result in command prompt like below image.


No comments:

Post a Comment