Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. @echo off
  2. set vwin=
  3. cls
  4. color 0A
  5. title OS detect by Servabat
  6. ver | find /i "version 6.1." > nul
  7. if %errorlevel%==0 set vwin=Windows 7
  8. ver | find /i "version 6.0." > nul
  9. if %errorlevel%==0 set vwin=Windows Vista
  10. ver | find /i "version 5.1." > nul
  11. if %errorlevel%==0 set vwin=Windows XP
  12. ver | find /i "version 5.2." > nul
  13. if %errorlevel%==0 set vwin=Windows 2003
  14. ver | find /i "Windows 2000" > nul
  15. if %errorlevel%==0 set vwin=Windows 2000
  16. ver | find /i "Windows NT" > nul
  17. if %errorlevel%==0 set vwin=Windows NT
  18. ver | find /i ">Windows ME" > nul
  19. if %errorlevel%==0 set vwin=Windows ME
  20. ver | find /i "Windows 98" > nul
  21. if %errorlevel%==0 set vwin=Windows 98
  22. ver | find /i "Windows 95" > nul
  23. if %errorlevel%==0 set vwin=Windows 95
  24.  
  25. echo OS : %vwin%
  26. REM ensuite tu peut procceder avec par ex if %vwin%=="Windows Sever" ( bla bla ) etc...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement