pf100

Win7-check.cmd

Jun 16th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. @echo off
  2. rem Get Windows OS build number
  3. for /f "tokens=2 delims==" %%a in ('wmic path Win32_OperatingSystem get BuildNumber /value') do (
  4. set /a WinBuild=%%a)
  5. rem Test for Windows 7
  6. if %winbuild% LEQ 7601 (echo Windows 7) else (echo not Windows 7)
  7. pause
Advertisement
Add Comment
Please, Sign In to add comment