在Win32类中查找Registry中的值 [英] Find value from Registry in a Win32 Class

查看:77
本文介绍了在Win32类中查找Registry中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我挖了挖,找不到答案,希望别人知道。

I have dug and dug and can not find the answer to this, hopefully someone else knows.

我有一个应用程序从HLM \ Hardware \Description \ System \ Bios中提取关键SystemSKU的值,我希望通过Win32类来完成此操作,因为我的应用程序的其余部分使用Win32类。

I have an application that pulls the value of key SystemSKU from HLM\Hardware\Description\System\Bios and I am looking to do this via a Win32 class, as the rest of my application utilizes Win32 classes.

如果我从Win32_BIOS中提取值,我找不到位于注册表中的SystemSKU的值。

If I pull the values from Win32_BIOS I do not find a value for the SystemSKU located in the registry.

使用WMI代码创建器我几乎浏览了所有类,并且没有看到注册表中的值SystemSKU返回(这是正确的值)。

Using the WMI Code Creator I have browsed almost every class and do not see the value SystemSKU in the registry is returning (which is the correct value).

任何人都可以对此有所了解,也许我错过了Win32 Class中的值,但我几乎100%肯定我没有。

Can anyone shed any light on this, maybe I missed the value in a Win32 Class but I am almost 100% sure I didnt.

推荐答案

这似乎工作正常

	Dim v As Object = My.Computer.Registry.GetValue(
	"HKEY_LOCAL_MACHINE\Hardware\Description\System\Bios", "SystemSKU", Nothing)
	MessageBox.Show(v.ToString)


这篇关于在Win32类中查找Registry中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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