Guest User

Untitled

a guest
Jun 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. @echo off
  2.  
  3. set bit=%PROCESSOR_ARCHITECTURE%
  4.  
  5. ver | find "2003" > nul
  6. if %ERRORLEVEL% == 0 set win=2003
  7.  
  8. ver | find "XP" > nul
  9. if %ERRORLEVEL% == 0 set win=xp
  10.  
  11. ver | find "2000" > nul
  12. if %ERRORLEVEL% == 0 set win=2000
  13.  
  14. ver | find "NT" > nul
  15. if %ERRORLEVEL% == 0 set win=nt
  16.  
  17. if not exist %SystemRoot%\system32\systeminfo.exe goto xphome
  18.  
  19. systeminfo | find "OS Name" > %TEMP%\osname.txt
  20. FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i
  21.  
  22. echo %vers% | find "Windows 7" > nul
  23. if %ERRORLEVEL% == 0 set win=7
  24.  
  25. echo %vers% | find "Windows Server 2008" > nul
  26. if %ERRORLEVEL% == 0 set win=2008
  27.  
  28. echo %vers% | find "Windows Vista" > nul
  29. if %ERRORLEVEL% == 0 set win=vista
  30.  
  31. :xphome
  32.  
  33. echo You are running Windows %win% %bit%.
  34.  
  35.  
  36. pause
Add Comment
Please, Sign In to add comment