Skip to content

Instantly share code, notes, and snippets.

@andcar72
Last active August 29, 2015 14:03
Show Gist options
  • Save andcar72/f192bb0d44c13552303d to your computer and use it in GitHub Desktop.
Save andcar72/f192bb0d44c13552303d to your computer and use it in GitHub Desktop.
winver.cmd - Riconosce quale versione di windows os sia in uso e anche se sia x86 oppure x64 -
@echo off
cls
echo WinVer.cmd
for /f %%i in ('ver^|find "5.0."') do echo Win NT && set osrecognized=1
for /f %%i in ('ver^|find "5.1."') do echo Win XP && set osrecognized=1
for /f %%i in ('ver^|find "5.2."') do echo Win 2003 && set osrecognized=1
for /f %%i in ('ver^|find "6.0."') do echo Win Vista && set osrecognized=1
for /f %%i in ('ver^|find "6.1."') do echo Win 7 && set osrecognized=1
if not defined osrecognized goto NotSupport
if "%processor_architecture%"=="x86" (Echo X86) ^
else (Echo X64)
goto end
:NotSupport
echo Do Not support Win NT earlier version
:end
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment