Created
February 14, 2017 09:46
-
-
Save nerflad/97e3fe8aca2aa09f6d44520e33f0ecf8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableExtensions | |
setlocal EnableDelayedExpansion | |
for /f "usebackq" %%i in (`wmic os get version ^| findstr /b "[0-9].*"`) do ( | |
set "winver=%%i" | |
set "winver=!winver:~0,3! | |
) | |
echo %winver% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment