Determining versions
winver.exe
One method to determine the
Windows version is using
winver.exe
which displays the version in a message box.
PowerShell
With
PowerShell, the version can be determined like so:
PS C:\> [environment]::osVersion.version
Major Minor Build Revision
----- ----- ----- --------
10 0 17763 0
PS C:\> [environment]::osVersion.versionString
Microsoft Windows NT 10.0.17763.0
Note, Windows 7, 8 and 8.1 all have version 6, but are distinguished by their minor number, as per the table below.
get-computerInfo | select-object osVersion
cmd.exe
C:\> ver
Microsoft Windows [Version 10.0.17763.168]
Registry
@echo off
setlocal enableDelayedExpansion
rem
rem needed for aligned output.
rem
set spaces=
for %%v in (CurrentVersion ProductName CurrentBuildNumber EditionID InstallationType ReleaseId) do (
for /f "tokens=3 usebackq" %%a in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v %%v`) do (
set keyNameWithSpaces=%%v!spaces!
rem
rem ~0,19 returns the first 19 characters
rem of keyNameWithSpaces and thus creates
rem aligned output.
rem
echo !keyNameWithSpaces:~0,19!: %%a
)
)
The script might print something like
CurrentVersion : 6.1
ProductName : Windows
CurrentBuildNumber : 7601
EditionID : Enterprise
InstallationType : Client
ReleaseId : 1809
PS C:\> get-itemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' | select-object `
currentBuild,
currentMajorVersionNumber,
currentMinorVersionNumber,
releaseId,
editionId,
productName
CurrentBuild : 17763
CurrentMajorVersionNumber : 10
CurrentMinorVersionNumber : 0
ReleaseId : 1809
EditionID : Professional
ProductName : Windows 10 Pro
Using systeminfo.exe
In
cmd.exe with
findstr.exe
. Note, because the
regular expression capabilities of
findstr.exe
don't support alternations, its not easy to restrict the output to
OS Name and
OS Version:
C:\Users\Rene>systeminfo | findstr OS
OS Name: Microsoft Windows 7 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer: Microsoft Corporation
OS Configuration: Member Workstation
OS Build Type: Multiprocessor Free
BIOS Version: Dell Inc. A21, 01.02.2018
In
PowerShell, it's easier to search for lines that match a list of regular expressions:
PS C:\> systeminfo | select-string "^OS Name", "^OS Version"
OS Name: Microsoft Windows 7 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
net config workstation
PS C:\> net config workstation | findstr /c:"Software version"
Software version Windows 10 Pro
PS C:\>
PROMPT environment variable in cmd.exe
Windows version and edition
The
Windows version and edition (but not the build number) can be shown by using the
Windows shortcut key Windows-key + Pause/break.
Version equivalency
Internal Vers. Nr | Product name | Server | Release date | Codename | #define WINVER | |
winver | | | | | | |
3.1 | Windows NT 3.1 | | July 1993 | | 0x0400 | |
3.5 | Windows NT 3.5 | | Sept 1994 | | | |
3.51 | Windows NT 3.51 | | May 1995 | | | |
4 | Windows NT | | July 1996 | | 0x0400 | _WIN32_WINNT_NT4 |
5 | Windows 2000 | | Dec 1999 | | 0x0500 | _WIN32_WINNT_WIN2K |
5.1 | Windows XP | | Aug 2001 | | 0x0501 | _WIN32_WINNT_WINXP |
5.2 | Windows Server 2003 | ✓ | Mar 2003 | | 0x0502 | _WIN32_WINNT_WINXP |
5.2 | Windows Server 2003 R2 | ✓ | Dec 2005 | | 0x0502 | _WIN32_WINNT_WINXP |
| Windows Small Business Server 2003 | ✓ | | | | |
| Windows Small Business Server 2003 R2 | ✓ | | | | |
6 | Windows Vista | | Jan 2007 | | 0x0600 | _WIN32_WINNT_VISTA |
6.1 | Windows Server 2008 | ✓ | Mar 2008 | | ? | ? |
| Windows Small Business Server 2008 | ✓ | | | | |
| Windows Server 2008 R2 | ✓ | | | | |
6.1 | Windows 7 | | Oct 2009 | | 0x0601 | _WIN32_WINNT_WIN7 |
| Windows Home Server 2007 | ✓ | | | | |
6.2 | Windows 8 | | Oct 2012 | | 0x0602 | _WIN32_WINNT_WIN8 |
| Windows Small Business Server 2011 | ✓ | | | | |
| Microsoft Windows Home Server 2011 | ✓ | | | | |
6.2 | Windows Server 2012 | | Oct 2012 | | 0x0602 | _WIN32_WINNT_WIN7 |
6.3 | Windows 8.1 | | Oct 2013 | | 0x0603 | _WIN32_WINNT_WINBLUE |
6.3 | Windows Server 2012 R2 | | Oct 2013 | | ? | ? |
10.0 (Build 10240) | Windows 10 | | Jul 2015 | Threshold 1 | 0x0A00 | _WIN32_WINNT_WIN10 |
10.0 (Build 10586) | Windows 10 vers. 1511 | | Nov 2015 | Threshold 2 | ? | ? |
10.0 (Build 14393) | Windows 10 vers. 1607 | | Jul 2016 | Redstone 1 | ? | ? |
? | Windows Server 2016 | | Oct 2016 | Redstone 2 ? | ? | ? |
? | | | | Redstone 3 ? | | |
10.0 (Build 17134) | | | Apr 2018 | Redstone 4 | | |
10.0 (Build 17763) | | | Oct 2018 | Redstone 5 | | |
| Windows Server 2019 | ✓ | | | | |
The versions numbers 1511 and 1607 refer to the the year and month (11/2015 and 07/2016, respectively)
Build 14393/Version 1607 is also referred to as anniversary update.
Windows 8 introduced a new API: the
Windows Runtime (Windows RT) which is built on TOP of
COM and aim at building
Windows Apps.
See also the SDKDDKVer.h
header file in the Windows SDK.
Character sets
Windows NT used (at least internally) UCS-2.
Starting with Windows 2000, Windows uses UTF-16.