cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sryan1977
Level 5

OS Build Number Check

I need to have an Exit Condition for my Installation Suite based off the Windows OS. My software requires Windows 10 20H2 (or above).

I initially had an Exit Condition which used Registry Comparison on "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName" to see if it contained the string "10". That was fine when I included all Windows 10 and 11.

However now, my cut off is Window 10 20H2 and above. I tried changing the Registry Comparison to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber" Greater Than or Equal To string "19042" but the check fails. 

Any idea why the check fails? Or have a better idea?

Labels (1)
0 Kudos
(3) Replies
sryan1977
Level 5

Looks like I may have a workaround, though I'm not sure it's the best answer.

I found I can use "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleseId". As of Windows 10 20H2 it's value is 2009 and it hasn't changed. So matching for that value works, but I'm afraid it may not work forever.

I'm still looking for a better option if anyone has a suggestion. 

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Rather than using a registry comparison exit condition - you can try a Platform exit condition instead.

Platform: Windows 10 or later
Build Number: 19042

This will evaluate the minimum build number version of Windows in target systems.

This method pulls the build number from windows API dwBuildNumber member of the OSVERSIONINFOEXA structure
https://learn.microsoft.com/en-gb/windows/win32/api/winnt/ns-winnt-osversioninfoexa?redirectedfrom=MSDN

 

0 Kudos

That was the first thing I tried. However, the installer failed to show the exit message with that condition. That's when I switch to the Registry Compare. 

0 Kudos