检测 Windows 10 OS Build 次要版本 [英] Detecting Windows 10 OS Build minor version

查看:116
本文介绍了检测 Windows 10 OS Build 次要版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个蓝牙低功耗库,这是由于

I've created a Bluetooth low-energy library, that due to an issue with Windows 10 Version 1709, only works for OS Build 16299.125 and above (fixed in the KB4054517 update). For earlier versions, it causes to BLE device to misbehave and give false connection indications.

Thus, I wish to check for the existence of this update on the client machine, and prevent the library from running if the version is too low.

I've followed this SO answer, and used RtlGetVersion() to get the OS version. However, as far as I can tell, no field in the returned structure contains the minor part of the build version (e.g. '125' in '16299.125'), AKA 'Update Build Revision' or UBR.

This is true even when calling RtlGetVersion() with the extended structure (RTL_OSVERSIONINFOEXW).

Is there a reliable way of getting the minor version of the OS build?

解决方案

This UBR value is stored in Registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion in a DWORD which you can query

这篇关于检测 Windows 10 OS Build 次要版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆