Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set bit=%PROCESSOR_ARCHITECTURE%
- ver | find "2003" > nul
- if %ERRORLEVEL% == 0 set win=2003
- ver | find "XP" > nul
- if %ERRORLEVEL% == 0 set win=xp
- ver | find "2000" > nul
- if %ERRORLEVEL% == 0 set win=2000
- ver | find "NT" > nul
- if %ERRORLEVEL% == 0 set win=nt
- if not exist %SystemRoot%\system32\systeminfo.exe goto xphome
- systeminfo | find "OS Name" > %TEMP%\osname.txt
- FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i
- echo %vers% | find "Windows 7" > nul
- if %ERRORLEVEL% == 0 set win=7
- echo %vers% | find "Windows Server 2008" > nul
- if %ERRORLEVEL% == 0 set win=2008
- echo %vers% | find "Windows Vista" > nul
- if %ERRORLEVEL% == 0 set win=vista
- :xphome
- echo You are running Windows %win% %bit%.
- pause
Add Comment
Please, Sign In to add comment