Windows 11 Support
 
Notifications
Clear all

Windows 11 Support

37 Posts
7 Users
1 Likes
452 Views
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

I'm playing with the Windows Insider build for Windows 11 and everything seems to work pretty well with the exception of the OSBUILD variables. The Major Version (%2) variable is still showing "10" for Windows 11. I think this due to the CurrentVersion number in the registry (HKLMSOFTWAREMicrosoftWindows NT) still being "6.3".

WMI=interval:0,color:ffdd99,set:WindowsVersion,namespace:rootcimv2,query:Win32_OperatingSystem,display:%caption% (%OSArchitecture%),hidden:1
REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionDisplayVersion,display:%1,hidden:1
IF=value1:%DisplayVersion%,value2:,comparator:eq
REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionReleaseId,display:%1,hidden:1
OSBUILD=interval:0,color:ffdd99,text:Operating System,display:%WindowsVersion% |%2.%3.%4 (%DisplayVersion%)

   
Quote
Topic Tags
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

OSBUILD uses the GetVersionEx api call. I just looked this up and it says the following:

With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version. The value returned by the GetVersionEx function now depends on how the application is manifested.

Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersionEx will always return the version that the application is manifested for in future releases.

It appears to be answering the question of "What is the OS version?" with "What would you like it to be?"

So maybe it's time to find something a little more deterministic


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

Maybe you should go back to the actual version number for that function (6.3 in this case)?

Side Note: I do find it funny that looking at registry keys, Windows 11 looks to be Windows 10 21H2, with an entirely new skin as part of the feature release. I mean, look at some of the info in the "CurrentVersion" key.


   
ReplyQuote
 cmd
(@cmd)
Eminent Member Registered
Joined: 3 years ago
Posts: 15
 

Hi Nathan,

You think it's funny that it still looks like Windows 10 -- look at the ReleaseId key -- the second half of 2020, despite your DisplayId showing 21H2! πŸ™‚

Anyways, here's my solution to get all the build info so far. It's a bit verbose, but works on all the machines I'm using it on!


# windows configuration
WMI=hidden:1,interval:0,namespace:rootcimv2,query:Win32_OperatingSystem,set:OSSku,display:%caption%
WMI=hidden:1,interval:0,namespace:rootcimv2,query:Win32_OperatingSystem,set:OSArch,display:%OSArchitecture%
WMI=hidden:1,interval:0,namespace:rootcimv2,query:Win32_OperatingSystem,set:OSVersion,display:%Version%
WMI=hidden:1,interval:0,namespace:rootcimv2,query:Win32_OperatingSystem,set:OSInstallDate,display:%InstallDate_month%[mmm] %InstallDate_day% %Installdate_year% %Installdate_hour%[1.0a]:%Installdate_minute%[2.0d] %Installdate_hour%[2.0p]
REG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionDisplayVersion,set:ReleaseID
REG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionUBR,set:UBR
IF=value1:%ReleaseID%,value2:,comp:eq
REG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionReleaseId,set:ReleaseID
IF=value1:%UBR%,value2:,comp:ne
SET=key:UBR,value:.%UBR%
OSBUILD=hidden:1,interval:0,set:OSBuild,display:Version %ReleaseID% Build %OSVersion%%UBR%

# later in the file...

# asset information

COMMENT=text:
COMMENT=text:%FullUser%,color:%Header%

COLOR=%Highlight%
COMMENT=text:%Manufacturer% %Model%
COMMENT=text:%OSSku% %OSArch%
COMMENT=text:%OSBuild%
COMMENT=text:Installed: %OSInstallDate%
COMMENT=text:BIOS revision: %SMBIOSBIOSVersion%
COLOR=%Default%

It grabs most things it can from WMI, the OS display name, arch, version (this is the main one, will be the 10.0.xxxxx), install date.
Then it gets the release ID from the registry. (This is the 'feature set' that will be the 1903/20H1/21H1, etc.) It gets it from the key DisplayVersion. However that key wasn't the one that windows used to use, having moved from the ReleaseId key. So later it will check to see if the value it got from DisplayVersion is empty, and if so, get the value from ReleaseId
Lastly, it gets the UBR key. The UBR is the .xxx that gets added on to the version shown in winver and the sort. That's another key that wasn't always there (can't quite remember when it was added), so if it's empty I let it stay empty. Otherwise the last IF sets it to it's value with the preceding ., so it looks nice tacked onto the osbuild printout.

I've attached a screenshot of what the output looks like.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

Oh, I'm well aware of the fact that it's Windows 10 with a facelift. Best thing in 11 I've found so far is that they got rid of Internet Explorer. The interface seems snappy, and since I run an Intel processor and not a Ryzen I'm not affected by the nasty L3 cache bug.


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

That might be the kind of thing I end up doing under the hood.

As of now VirtualBox won't load Win11 so I can't even test it.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

Why won't it load? TPM and Secure Boot? If so, just rename the "sourcesappraiserres.dll" file in the install media with a trailing "_bak" and re-run the setup. Bypasses all the checks.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

Here is the custom Operating System and Build# section I'm using. Feel free to use what you want.

WMI=interval:0,color:ffdd99,set:WindowsVersion,namespace:rootcimv2,query:Win32_OperatingSystem,display:%caption% (%OSArchitecture%),hidden:1
REG=interval:0,set:MajorVersion,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionCurrentVersion,display:%1,hidden:1
REG=interval:0,set:CurrentBuild,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionCurrentBuild,display:%1,hidden:1
REG=interval:0,set:MinorBuild,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionUBR,display:%1,hidden:1
REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionDisplayVersion,display:%1,hidden:1
IF=value1:%DisplayVersion%,value2:,comparator:eq
REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionReleaseId,display:%1,hidden:1
TEXT=interval:0,color:ffdd99,text:Operating System,display:%WindowsVersion% |%MajorVersion%.%CurrentBuild%.%MinorBuild% (%DisplayVersion%)

   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

It doesn't support TPM apparently. I tried your suggestion of renaming the dll but it still says the machine doesn't meet the spec requirements.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

When I renamed the file to "appraiserres.dll_bak" it worked fine to disable the checks. I even installed it on an older 3rd Gen Intel Core-i5 with a TPM 1.2 without issue. You do have to make sure that you completely close and re-launch the installer. I ran it from a USB drive.


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

Just as an FYI:

those four WMI queries which are all the same except retrieving a different property can be handled by a single query:

WMI=namespace:rootcimv2,query:Win32_OperatingSystem,
  set:OSSku=%caption% OSArch=%OSArchitecture% OSVersion=%Version% OSInstallDate,
  display:%InstallDate_month%[mmm] %InstallDate_day% %Installdate_year% %Installdate_hour%[1.0a]:%Installdate_minute%[2.0d] %Installdate_hour%[2.0p]
TEXT=text:Operating System,display:%OSSku%|%OSArch% %OSVersion%|Installed: %OSInstallDate%

   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

Ok, I've added a new item called OSBUILD2 which basically encompasses all of this.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 3 years ago
Posts: 111
Topic starter  

Can something similar to this be done with REG keys too? Something like the example below:

REG=interval:0,value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion,set:MajorVersion=%CurrentVersion% CurrentBuild=%CurrentBuild% MinorBuild=%UBR% DisplayVersion=%DisplayVersion%,hidden:1


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1206
 

hrmm....


   
ReplyQuote
(@rtruss)
Trusted Member Registered
Joined: 3 years ago
Posts: 69
 

Got it and loving it so far. One question is there a way to remove the Microsoft from the OSDBUILD2 %1 variable? We know its microsoft already so.. Just trying to keep it more concise to fit in smaller widnows

OSBUILD2=display:%1 %18 (%17)
Displays; Microsoft Windows 11 Enterprise 21H2 (22000)

looking for; Windows 11 Enterprise 21H2 (22000)

at least without doing other types of wmi calls like like i am now:

# OS info lookup table
REG=value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionCurrentBuild, set:currentbuild, hidden:1
REG=value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProductName, set:productname, hidden:1
REG=value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionReleaseId, set:releaseid, hidden:1
#This line item only applies to WIN10 Workstations
REG=value:HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionDisplayVersion, set:displayversion, hidden:1

WMI=Text:Operating System,namespace:rootcimv2,query:Win32_OperatingSystem,display:%ProductName% %DisplayVersion% (%CurrentBuild%)

I also attached an example of what I used to get and what the OSBUILD2 shows


   
ReplyQuote
Page 1 / 3
Glenn's Page