Some time ago, I gave a scripting solution to the problem of obtaining the computer manufacturer and model. But what if you want to do this from C++?
I could translate the script into C++, or I could just point you to Creating a WMI Application Using C++ in MSDN. In particular, one of the WMI C++ Sample Applications does exactly what you want: Example: Creating a WMI Application. The only things you need to do are
- change
SELECT * FROM Win32_Process
toSELECT * FROM Win32_ComputerSystem
, and - change
Name
toManufacturer
, and then again toModel
.
0 comments