如何从C ++的Windows注册表中获取计算机制造商和模型? [英] How to get computer manufacturer and model from windows registry in C++?
本文介绍了如何从C ++的Windows注册表中获取计算机制造商和模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写自己的C ++代码,通过读取和解析注册表项来读取Windows计算机上的计算机型号和制造商
I am writing my own C++ code to read the computer model and manufacturer on a Windows computer by reading and parsing the registry key
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/mssmbios/Data/SMBiosData
推荐答案
您需要的步骤在使用C ++创建WMI应用程序 。 MSDN甚至包括示例程序。
The steps you need are explained on Creating a WMI Application Using C++. MSDN even includes a sample program. You just need to change two strings.
- 更改
SELECT * FROM Win32_Process
到SELECT * FROM Win32_ComputerSystem
- 将
更改为
模型
。
- Change
SELECT * FROM Win32_Process
toSELECT * FROM Win32_ComputerSystem
- Change
Name
toManufacturer
and then again forModel
.
这篇关于如何从C ++的Windows注册表中获取计算机制造商和模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文