- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: OS Build Number Check
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.