33 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
44 * obtain one at http://mozilla.org/MPL/2.0/
55 *
6- * Copyright (C) 2001-2020 , Peter Johnson (@delphidabbler).
6+ * Copyright (C) 2001-2021 , Peter Johnson (@delphidabbler).
77 *
8- * $Rev: 2069 $
9- * $Date: 2021-09-14 16:00:48 +0100 (Tue, 14 Sep 2021) $
8+ * $Rev: 2079 $
9+ * $Date: 2021-11-27 14:29:47 +0000 (Sat, 27 Nov 2021) $
1010 *
1111 * This unit contains various static classes, constants, type definitions and
1212 * global variables for use in providing information about the host computer and
@@ -1185,9 +1185,12 @@ implementation
11851185 https://en.wikipedia.org/wiki/Windows_Server
11861186 https://en.wikipedia.org/wiki/Windows_Server_2019
11871187 https://en.wikipedia.org/wiki/Windows_Server_2016
1188- https://tinyurl.com/y8tfadm2
1189- https://tinyurl.com/usupsz4a
1188+ https://tinyurl.com/y8tfadm2 (MS Windows Server release information)
1189+ https://tinyurl.com/usupsz4a (Win 11 Version Numbers & Build Versions)
11901190 https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022
1191+ https://tinyurl.com/yj5e72jt (MS Win 10 release info)
1192+ https://tinyurl.com/kd3weeu7 (MS Server release info)
1193+
11911194
11921195 Note:
11931196 For Vista and Win 7 we have to add service pack number to these values to
@@ -1218,30 +1221,32 @@ implementation
12181221 Win1020H1Build = 19041 ; // Windows 10 20H1 - version 2004
12191222 Win1020H2Build = 19042 ; // Windows 10 20H2 - version 20H2
12201223 Win1021H1Build = 19043 ; // Windows 10 21H1 - version 21H1
1221- { TODO: 2021-09-11
1222- - Win 21H2 due late 2021
1223- - Update following var name once Win21H2 released}
1224- _Win1021H2Build = 19044 ; // Windows 10 21H2 - version 21H2
1224+ Win1021H2Build = 19044 ; // Windows 10 21H2 - version 21H2
12251225
12261226 // Windows 11 ----------------------------------------------------------------
1227- { TODO: 2021-09-11
1228- - Add more Win11 versions as discovered. }
1229- // NOTE: Preview and beta versions of Windows 11 report version 10.0
1227+ // NOTE: Preview and beta & release versions of Windows 11 report version 10.0
12301228 Win11DevBuild = 21996 ; // Windows 11 version Dev
12311229 // - 10.0.21996.1 (Insider version)
12321230 Win11v21H2Build = 22000 ; // Version depends on revision # [Rev#]:
1233- // Revision # 51.. 168:
1231+ // Revision # 51,65,71,100,120,132, 168:
12341232 // Windows 11 version 21H2
12351233 // - 10.0.22000.[Rev#] (Insider version)
12361234 // Revision # 184
12371235 // Windows 11 version 21H2
12381236 // - 10.0.22000.184 (Beta Version)
1239- // Revision # >=185
1240- // Windows 11 (unknown version)
1241- Win11c21H2PreRel1Build = 22449 ; // Windows 11 version 21H2
1237+ // Revision # 194
1238+ // Windows 11 version 21H2
1239+ // - ** 1st Public Release **
1240+ Win11v21H2PreRel1Build = 22449 ; // Windows 11 version 21H2
12421241 // - 10.0.22449.000 (RSPRERELEASE)
1243- Win11c21H2PreRel2Build = 22454 ; // Windows 11 version 21H2
1242+ Win11v21H2PreRel2Build = 22454 ; // Windows 11 version 21H2
12441243 // - 10.0.22454.1000 (RSPRERELEASE)
1244+ Win11v21H2PreRel3Build = 22458 ; // Windows 11 version 21H2
1245+ // - 10.0.22458.1000 (RSPRERELEASE)
1246+ Win11v21H2PreRel4Build = 22463 ; // Windows 11 version 21H2
1247+ // - 10.0.22463.1000 (RSPRERELEASE)
1248+ Win11v21H2PreRel5Build = 22468 ; // Windows 11 version 21H2
1249+ // - 10.0.22468.1000 (RSPRERELEASE)
12451250
12461251 Win11FirstBuild = Win11DevBuild; // First build number of Windows 11
12471252
@@ -1724,13 +1729,16 @@ procedure InitPlatformIdEx;
17241729 begin
17251730 case InternalMinorVersion of
17261731 0 :
1732+ // ** As of 2021/10/05 all releases of Windows 10 **and**
1733+ // Windows 11 report major version 10 and minor version 0
17271734 if (Win32ProductType <> VER_NT_DOMAIN_CONTROLLER)
17281735 and (Win32ProductType <> VER_NT_SERVER) then
17291736 begin
17301737 if IsBuildNumber(Win10TH1Build) then
17311738 begin
1739+ // First public release of Window 10
17321740 InternalBuildNumber := Win10TH1Build;
1733- InternalExtraUpdateInfo := ' Version 1507' ; // 1st Win 10 version
1741+ InternalExtraUpdateInfo := ' Version 1507' ;
17341742 end
17351743 else if IsBuildNumber(Win10TH2Build) then
17361744 begin
@@ -1789,25 +1797,16 @@ procedure InitPlatformIdEx;
17891797 InternalBuildNumber := Win1021H1Build;
17901798 InternalExtraUpdateInfo := ' Version 21H1' ;
17911799 end
1792- else if IsBuildNumber(_Win1021H2Build ) then
1800+ else if IsBuildNumber(Win1021H2Build ) then
17931801 begin
1794- { TODO: Added 2021/09/11
1795- - Release expected late 2021
1796- - Fix build number if necessary
1797- - Remove underscore prefix from const name
1798- - Fix value of InternalExtraUpdateInfo as required }
1799- InternalBuildNumber := _Win1021H2Build;
1802+ // From 21H2 Windows 10 moves from a 6 monthly update cycle to a
1803+ // yearly cycle
1804+ InternalBuildNumber := Win1021H2Build;
18001805 InternalExtraUpdateInfo := ' Version 21H2' ;
18011806 end
18021807 // As of 2021-09-11, Win 11 pre-releases are reporting v10.0
18031808 // Details taken from: https://tinyurl.com/usupsz4a
1804- // Correct according to above web oage as of 2021-09-11
1805- { TODO: Added 2021-09-11
1806- - Revisit URL to check for change following official release
1807- of Windows 11
1808- - Add any further pre-release versions
1809- - Check if final release has major version 11
1810- }
1809+ // Correct according to above web page as of 2021-09-11
18111810 else if IsBuildNumber(Win11DevBuild) then
18121811 begin
18131812 InternalBuildNumber := Win11DevBuild;
@@ -1821,49 +1820,74 @@ procedure InitPlatformIdEx;
18211820 // There are several Win 11 releases with this build number
18221821 // Which release we're talking about depends on the revision
18231822 // number.
1823+ // *** Amazingly one of them, revision 194, is the 1st public
1824+ // release of Win 11 -- well hidden eh?!
18241825 InternalBuildNumber := Win11v21H2Build;
1825- if InternalRevisionNumber in [51 , 65 , 71 , 100 , 120 , 132 , 168 ] then
1826- begin
1827- InternalExtraUpdateInfo := Format(
1828- ' Version 21H2 [Insider v10.0.%d.%d]' ,
1829- [InternalBuildNumber, InternalRevisionNumber]
1830- );
1831- end
1832- else if InternalRevisionNumber = 184 then
1833- begin
1834- InternalExtraUpdateInfo := Format(
1835- ' Version 21H2 [Beta v10.0.%d.%d]' ,
1836- [InternalBuildNumber, InternalRevisionNumber]
1837- );
1838- end
1839- else
1840- begin
1841- InternalExtraUpdateInfo := Format(
1842- ' Unknown release v10.0.%d.%d' ,
1843- [InternalBuildNumber, InternalRevisionNumber]
1844- );
1826+ case InternalBuildNumber of
1827+ 194 :
1828+ // First public release of Windows 11
1829+ InternalExtraUpdateInfo := ' Version 21H2' ;
1830+ 51 , 65 , 71 , 100 , 120 , 132 , 168 :
1831+ InternalExtraUpdateInfo := Format(
1832+ ' Version 21H2 [Insider v10.0.%d.%d]' ,
1833+ [InternalBuildNumber, InternalRevisionNumber]
1834+ );
1835+ 184 :
1836+ InternalExtraUpdateInfo := Format(
1837+ ' Version 21H2 [Beta v10.0.%d.%d]' ,
1838+ [InternalBuildNumber, InternalRevisionNumber]
1839+ );
1840+ else
1841+ InternalExtraUpdateInfo := Format(
1842+ ' Unknown release v10.0.%d.%d' ,
1843+ [InternalBuildNumber, InternalRevisionNumber]
1844+ );
18451845 end ;
18461846 end
1847- else if IsBuildNumber(Win11c21H2PreRel1Build ) then
1847+ else if IsBuildNumber(Win11v21H2PreRel1Build ) then
18481848 begin
1849- InternalBuildNumber := Win11c21H2PreRel1Build ;
1849+ InternalBuildNumber := Win11v21H2PreRel1Build ;
18501850 InternalExtraUpdateInfo := Format(
18511851 ' Version 21H2 [RSPRERELEASE v10.0.%d.%d]' ,
18521852 [InternalBuildNumber, InternalRevisionNumber]
18531853 );
18541854 end
1855- else if IsBuildNumber(Win11c21H2PreRel2Build ) then
1855+ else if IsBuildNumber(Win11v21H2PreRel2Build ) then
18561856 begin
1857- InternalBuildNumber := Win11c21H2PreRel2Build ;
1857+ InternalBuildNumber := Win11v21H2PreRel2Build ;
18581858 InternalExtraUpdateInfo := Format(
18591859 ' Version 21H2 [RSPRERELEASE v10.0.%d.%d]' ,
18601860 [InternalBuildNumber, InternalRevisionNumber]
18611861 );
1862- end ;
1862+ end
1863+ else if IsBuildNumber(Win11v21H2PreRel3Build) then
1864+ begin
1865+ InternalBuildNumber := Win11v21H2PreRel3Build;
1866+ InternalExtraUpdateInfo := Format(
1867+ ' Version 21H2 [RSPRERELEASE v10.0.%d.%d]' ,
1868+ [InternalBuildNumber, InternalRevisionNumber]
1869+ );
1870+ end
1871+ else if IsBuildNumber(Win11v21H2PreRel4Build) then
1872+ begin
1873+ InternalBuildNumber := Win11v21H2PreRel4Build;
1874+ InternalExtraUpdateInfo := Format(
1875+ ' Version 21H2 [RSPRERELEASE v10.0.%d.%d]' ,
1876+ [InternalBuildNumber, InternalRevisionNumber]
1877+ );
1878+ end
1879+ else if IsBuildNumber(Win11v21H2PreRel5Build) then
1880+ begin
1881+ InternalBuildNumber := Win11v21H2PreRel5Build;
1882+ InternalExtraUpdateInfo := Format(
1883+ ' Version 21H2 [RSPRERELEASE v10.0.%d.%d]' ,
1884+ [InternalBuildNumber, InternalRevisionNumber]
1885+ );
1886+ end
18631887 end
1864- else
1888+ else // Win32ProductType in [VER_NT_DOMAIN_CONTROLLER, VER_NT_SERVER]
18651889 begin
1866- // Check for Win Server 2016 echnical previews.
1890+ // Check for Win Server 2016 technical previews.
18671891 // We don't check for TP1 // here because that reported version 6.4,
18681892 // not version 10!
18691893 if IsBuildNumber(Win2016TP2Build) then
@@ -2685,7 +2709,7 @@ class function TPJOSInfo.Product: TPJOSProduct;
26852709 if InternalBuildNumber < Win11FirstBuild then
26862710 Result := osWin10
26872711 else
2688- // As of 2021-09-11 Win 11 is reporting version 10.0
2712+ // ** As of 2021-10-05 Win 11 is reporting version 10.0!
26892713 Result := osWin11;
26902714 end
26912715 else
0 commit comments