Tuesday, March 29, 2011

Operating System Info–Batch File

Here is a simple batch file which you can use to identify the version of Operating System (OS).  I created this blog based on a question posted on the

@echo off
ver | find "6.1" > nul
if %ERRORLEVEL% == 0 goto Win7

ver | find "5.1" > nul
if %ERRORLEVEL% == 0 goto WinXP

goto exit

echo Running Windows 7 Script
goto exit

echo Running Windows XP Script
goto exit


You can also use  systeminfo | find "Windows XP" or systeminfo | find "Windows 7" filter instead of VER command. 

The  Systeminfo /S ComptuerName command can be used to collect system information from a remote machine.  Here is an example to get the Logon Server information from a remote machine:

systeminfo  /s RemoteComputer | find "Logon Server:"


I recommend you to check https://college-homework-help.org/blog/philosophy-degree out if you want to know more about philosophy degree. Education is really important for me , because I want to have successful career.

Post a Comment

Popular Posts


Twitter Delicious Facebook Digg Stumbleupon Favorites More