Practical: Version Checking
You are deploying a script that only works on Windows 10 or later (Version 10.0+). You need to verify the OS version before proceeding.
The Mission
Check the exact build number of the current Windows installation.
Step 1: Run Ver
Command Prompt
C:\Users\User>ver
Step 2: Use in a Script
Here is how you would use it in a batch file to automate the check.
ver | find "10.0" > nul
if %ERRORLEVEL% == 0 (
echo Windows 10/11 Detected. Proceeding...
) else (
echo Old Windows Version Detected. Aborting.
)
Knowledge Check
1 / 2What is the primary purpose of the 'ver' command?