How do I obtain the computer manufacturer’s name?

One customer wanted a way to determine the name of the computer manufacturer. For example, they wanted to make some function call and get back "IBM" or "Compaq" or "Dell". I don't know why they wanted this information, and for the moment, I don't care.

And of course, when you're looking for information, you don't search MSDN; that's for crazy people. No, let's just fire up regedit and hit Ctrl+F. (I can't imagine how many application compatibility bugs were created by that "helpful" Ctrl+F dialog in regedit.)

The customer found the registry keys that are used to customize the System control panel, as well as the OEMINFO.INI file that also takes part. But then the question of reliability arose. After all, since it's just a registry key and an INI file, the user could just edit it and make it say anything they want. If the customer wiped their hard drive and reinstalled Windows from scratch, then this information would be lost, too. This customer wanted some degree of assurance that if the computer claimed to be a Dell, then it really was a Dell.

Enter WMI. The Scripting Guys are all over WMI. If you search for the phrase "from Win32_ComputerSystem" you will find hit after hit from the Hey, Scripting Guy! column.

And it so happens that WMI exposes the computer manufacturer info as well. If you look at the scripts that the Scripting Guys put out, probably two thirds of them fall into this pattern:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from something")
For Each objItem in colItems
     Wscript.Echo objItem.something

All we have to do is fill in the "something".

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem in colItems
     Wscript.Echo "System Name: " & objItem.Name
     Wscript.Echo "Manufacturer: " & objItem.Manufacturer
     Wscript.Echo "Model: " & objItem.Model

Okay, so great, we can use WMI to get this information. But how reliable is it?

Well, the WMI folks tell me that they get the information by querying the SMBIOS directly, so it's as reliable as your BIOS. Major manufacturers will put their names into the BIOS¹, but if you're running on a home-built machine, the values are whatever came with your motherboard. The BIOS manufacturers typically put placeholder strings into their SMBIOS, setting the manufacturer to a generic string like "Manufacturer", for example. When the motherboard manufacturer installs the BIOS, they're supposed to replace the placeholder strings with something more meaningful, but most of them don't bother. The result is that a machine you put together from parts you bought at the local computer shop will most likely just say "Manufacturer" for the manufacturer.

In summary, if you query WMI for the computer manufacturer and it comes back "Dell", then you can be pretty sure you have a Dell. (Either that or somebody with way too much time on their hands burned a custom BIOS that says "Dell".) On the other hand, if it comes back as "Manufacturer" then you're still in the dark. All you know is you've got some sort of generic computer.

¹Even though major manufacturers will put their name into the BIOS, I'm told that if you send your computer back to the manufacturer and they replace the motherboard, they will sometimes forget to burn their name into the BIOS of the replacement motherboard. As a result, even on a name-brand computer, you might see "Manufacturer".

Comments (33)
  1. nathan_works says:

    You didn’t care why the customer wanted that information ? I would think you would care, based on the large number of posts/regular feature you have about customers asking the wrong question/asking how to do something when that’s not really what they want to do. You then go about telling them how to correctly do whatever it is they want to do.

    [I wrote that so I wouldn’t have to waste time and effort explaining the reason, which is irrelevant to the article. -Raymond]
  2. John says:

    Is there a plain old Win32 C API to get this information?

    [Don’t be helpless. -Raymond]
  3. > Is there a plain old Win32 C API to get this information?

    From what I can tell you can get the SMBIOS info using GetSystemFirmwareTable:

    There’s also an alluringly-named GetFirmwareEnvironmentVariable in the same section.

    [I was thinking more along the lines of The C++ interface to WMI. -Raymond]
  4. Mojo says:

    And of course, when you’re looking for information, you don’t search MSDN; that’s for crazy people.

    Um… I don’t know what you’re capacity is over at Microsoft exactly, but since you brought up this point…

    Can you work with the team to fix that?  I mean, MSDN search is awful now.  I know it’s less than clear to say "Search is awful," but please, the poor quality of documentation is putting off too many devs.

  5. Dan says:

    Mojo… this is the INTERNET.  Don’t rely on the whims of anyone to fix their website, come up with your own fix.  When I find a site search that I hate, I just turn to a search engine I love for help.

  6. suprised says:

    I would be surprised to find out a major manufacturer forgot to burn their bios; after all isn’t SLP dependent on info in the bios? If a major manufacturer did slip wouldn’t windows bitch about not being activated?

  7. Staffan Gustafsson says:

    You can always use PowerShell:

    Get-WmiObject Win32_ComputerSystem


  8. John says:

    GetSystemFirmwareTable doesn’t exist on 32-bit XP or 2000.  I already know about WMI, but working with WMI in general (and particularly in C) is a bit of a pain.  I was hoping for something closer to GetSystemInfo, but as far as I can tell nothing like that exists going back to 2000.

  9. Lukas Beeler says:

    There’s always

    system("wmic computersystem get manufacturer");

    Just kidding ;)

  10. Anon says:

    Whenever you post you always seem to hit the nail on the head. Here are some stats collected by Linux users (yeah, I know Linux small and backwards but still) and it bears out your point ("System manufacturer" and "To Be Filled By O.E.M." seem popular in the vendors chart) – .

  11. Jonathan says:

    You can also run msinfo32 and look there. Presumably it reads through WMI as well.

    And yep, I got a "System manufacturer" here too.

  12. Karellen says:

    "One customer wanted a way to determine the name of the computer manufacturer."


    Do you have any idea /why/? Or what they were planning on /doing/ with that information?

    This sounds to me like they’re asking for help on a step on the wrong path, instead of asking for help about how to reach their goal[0].


  13. Tired says:

    I think Eric S. Raymond needs to write a new essay about writing *smart* replies to blogs.  People, FORGET about the fact that this originated from a customer question.  Stay focused!

    How do you get the name of the computer manufacturer?  Raymond shows one way but points out the pitfalls.  Period.  End of story.  Move on.  Why are you people making this more complicated?

  14. John Topley says:


    Do you have any idea /why/? Or what they were planning on /doing/ with that information?"

    Why boggle? Perhaps the customer was writing some sort of utility application that displays system information. Or maybe it was an asset management app that crawls a network and reports back on the PCs it finds. There are legitimate uses for the information.

  15. Anonymous Coward says:

    On my computer it says ‘System Manufacturer’. Since I bought it off the shelf, and the particular model was quite popular at the time I bought it, due to a very attractive price/performance ratio, I’d say the reliability of this field ism’t that great.

    Also, if you look at the chart, it looks like approximately a quarter of times it says ‘Unknown’. By the way, that chart is one of the worst charts I’ve seen in quite a while. Not just aren’t they using a pie chart for fractions of a whole, but the bars don’t start at zero and it’s hard to extract numbers from it.

  16. "To Be Filled By O.E.M." is the default for most SMBIOS strings in an AMI BIOS.

    From the perspective of a Motherboard Manufacturer (or in my case embedded Single Board Computer), the SMBIOS data can be a pain.  It contains a lot of fields like "Case Mfr" and "Power Supply Mfr".  Unfortunately, I don’t know what values to put in those fields when I make the BIOS.  So, I’m forced to fill in generic terms like "Manufacturer".

    There usually aren’t many options to tweak the SMBIOS data after it has been loaded onto the Motherboard.  There are a few Mobo Mfrs that provide tools to modify the SMBIOS data (Intel does), but most do not.  So, most white-box System Mfrs can’t do anything to fix it.

    SMBIOS data becomes significantly less useful when you don’t make the entire box.

  17. Drak says:

    Another thing that I see regarding the names in the Linux chart is that Dell seems to have changed it somewhere along the line (there are two different ‘Dell names’).

    (By the way it amazes me how popular Dell is)

  18. Jules says:

    Interesting.  My system has a possibility you didn’t mention:

    System Name: MINERVA

    Manufacturer: P4M80P

    Model: AWRDACPI

    P4M80P is the model name of my computer’s motherboard, which was manufactured by Gigabyte.  The computer manufacturer is ‘eSys’.  AWRDACPI appears to be the BIOS producer.  Why these two strings are useful but essentially the wrong way around mystifies me somewhat. :)

  19. Jules says:

    Drak: "it amazes me how popular Dell is"

    Not me. 1) they’re a well-known brand name who produce computers for very reasonable prices; 2) their computers are actually reasonably good quality.  Specifically, in the 90s, they were among the first manufacturers to start using screwless cases, which make any upgrades/maintenance you need to perform much quicker.  I still remember my old Optiplex desktop fondly: press the two buttons at the back, slide the top forwards.  Pull up the lever that holds the PCI bus daughterboard down and lift it out.  Adding cards is now trivial, as is putting everything back together.  I wish the computers I’ve had since were so easy to work on…

  20. Aaargh! says:

    Another thing that just so much easier on a Mac ;)

  21. SRS says:

    Could your customer not just take a look at the computer’s case?

  22. Rainer says:

    SRS wrote:

    Could your customer not just take a look at the computer’s case?

    Yes if we’re talking about one case :-)

  23. Garry Trinder says:

    @SRS:  Only if your customer is in the same room as the computer.

  24. Jim Arthur says:

    Did anyone actually try the script? Works just fine. In my case it returns the following "wealth" of information —

    Microsoft (R) Windows Script Host Version 5.7

    Copyright (C) Microsoft Corporation. All rights reserved.


    Manufacturer: Dell Inc.

    Model: Vostro 200

  25. as far as I can tell nothing like that exists going back to 2000

    I’m with you here… for Windows 2000 and 32-bit XP it looks like you’re stuck with accessing WMI one way or another.

  26. manicmarc says:

    Just tell them to look at the sticker on the front of their PC :)

  27. DWalker says:

    I always wondered why the case manufacturer information would be useful, and why anyone would burn that info into the CMOS/BIOS.  If you change the case, the CMOS information is no longer correct!  The BIOS burned into CMOS can’t tell who manufactured the case…

    And yes, looking at a computer can tell you some stuff, but as mentioned above, when you want to compile a list of information about the 10,000 computers in your company, you don’t want to physically look at all of them one at a time.

  28. Stu Fox says:

    What about:

    wmic CSProduct


    wmic CSProduct Get Vendor

    Works at the command line just fine…

  29. SuperKoko says:


    If you change the case, the CMOS information is no longer correct!


    However, I think that, when managing 10000 computers, guys rarely change the computers cases.

  30. Igor Levicki says:

    >when you want to compile a list of information about the 10,000 computers in your company, you don’t want to physically look at all of them one at a time.<<

    Well it depends — if you can get away with it and earn more money doing that than programming the interface then I’d go around with a paper and pencil glazing at the cases while trying to look as if I am doing some really important work. ;-)

  31. Friday says:

    I think it’s another DRM – like scheme emerging, like – "your computer doesn’t belong to you, it belongs to your manufacturer. You’re only using it."

    I’m kidding, but just wait…


  32. bobn says:

    Is there any way to to retrieve the color of the case?

  33. Jonathan says:


    Hmm, according to the stickers on my case my Dell was jointly manufactured by ‘Intel Inside’ and ‘Microsoft Windows XP’

    If you’re talking to someone who actually needs instructions on how to determine their computer’s manufacturer asking them to "look at the sticker on the front of their PC" is likely to give amusing but unhelpful results. :)

Comments are closed.

Skip to main content