{"id":403,"date":"2014-07-25T07:00:00","date_gmt":"2014-07-25T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2014\/07\/25\/how-do-i-obtain-the-computer-manufacturers-name-from-c\/"},"modified":"2014-07-25T07:00:00","modified_gmt":"2014-07-25T07:00:00","slug":"how-do-i-obtain-the-computer-manufacturers-name-from-c","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20140725-00\/?p=403","title":{"rendered":"How do I obtain the computer manufacturer&#039;s name from C++?"},"content":{"rendered":"<p> Some time ago, I gave <a href=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2008\/12\/18\/9233149.aspx\"> a scripting solution to the problem of obtaining the computer manufacturer and model<\/a>. But what if you want to do this from C++? <\/p>\n<p> I could translate the script into C++, or I could just point you to <a href=\"http:\/\/msdn.microsoft.com\/library\/windows\/desktop\/aa389762\"> Creating a WMI Application Using C++<\/a> in MSDN. In particular, one of the <a href=\"http:\/\/msdn.microsoft.com\/library\/windows\/desktop\/aa394558\"> WMI C++ Sample Applications<\/a> does exactly what you want: <a href=\"http:\/\/msdn.microsoft.com\/library\/windows\/desktop\/aa390418\"> Example: Creating a WMI Application<\/a>. The only things you need to do are <\/p>\n<ul>\n<li>change <code>SELECT * FROM Win32_Process<\/code> to            <code>SELECT * FROM Win32_ComputerSystem<\/code>, and <\/li>\n<li>change <code>Name<\/code> to <code>Manufacturer<\/code>,     and then again to <code>Model<\/code>. <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}