如何从C ++的Windows注册表中获取计算机制造商和模型? [英] How to get computer manufacturer and model from windows registry in C++?

查看:1047
本文介绍了如何从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.


  1. 更改 SELECT * FROM Win32_Process SELECT * FROM Win32_ComputerSystem

  2. 更改为 ,然后再次模型

  1. Change SELECT * FROM Win32_Process to SELECT * FROM Win32_ComputerSystem
  2. Change Name to Manufacturer and then again for Model.

这篇关于如何从C ++的Windows注册表中获取计算机制造商和模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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