Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get serial number of motherboard using C++ on WINDOWS?

How to get serial number of motherboard using C++ on WINDOWS?

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aseem Sharma
    wrote on last edited by
    #1

    Hi friends, Can somebody provide me the sample code for getting serial number of motherboard using C++ on WINDOWS? Regards Aseem

    C D L 3 Replies Last reply
    0
    • A Aseem Sharma

      Hi friends, Can somebody provide me the sample code for getting serial number of motherboard using C++ on WINDOWS? Regards Aseem

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      I doubt there is a common way to do that, if any at all (i might be wrong and correct me if i am, fellas), maybe check out if WMI[^] has a way, e.g. here[^] it mentions a "serial number" and "bios asset tag", that's probably not for the motherboard though... Here[^] are examples about how to use WMI in C++.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

      A 1 Reply Last reply
      0
      • A Aseem Sharma

        Hi friends, Can somebody provide me the sample code for getting serial number of motherboard using C++ on WINDOWS? Regards Aseem

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Check out the DeviceID property of the Win32_MotherboardDevice class.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        1 Reply Last reply
        0
        • A Aseem Sharma

          Hi friends, Can somebody provide me the sample code for getting serial number of motherboard using C++ on WINDOWS? Regards Aseem

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          You want WMI; see the SerialNumber property of the Win32_BaseBoard class. Note: AFAIK it gets stored in the BIOS memory, and flashing a new BIOS is likely to erase the number. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

          C 1 Reply Last reply
          0
          • L Luc Pattyn

            You want WMI; see the SerialNumber property of the Win32_BaseBoard class. Note: AFAIK it gets stored in the BIOS memory, and flashing a new BIOS is likely to erase the number. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            C Offline
            C Offline
            Code o mat
            wrote on last edited by
            #5

            Is that universal, i mean, whould that work on any system?

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

            L 1 Reply Last reply
            0
            • C Code o mat

              Is that universal, i mean, whould that work on any system?

              > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Code-o-mat wrote:

              whould that work on any system?

              which part of it, getting it or getting rid of it? and I'm afraid I don't know for all systems either way. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

              Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

              C 1 Reply Last reply
              0
              • L Luc Pattyn

                Code-o-mat wrote:

                whould that work on any system?

                which part of it, getting it or getting rid of it? and I'm afraid I don't know for all systems either way. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                C Offline
                C Offline
                Code o mat
                wrote on last edited by
                #7

                I meant the "getting it" part. I guess the "getting rid" part would work on any system that can have a big enough hammer applied on. :)

                > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

                L 1 Reply Last reply
                0
                • C Code o mat

                  I meant the "getting it" part. I guess the "getting rid" part would work on any system that can have a big enough hammer applied on. :)

                  > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #8

                  as always with WMI, it depends on the manufacturers. If they decide not to bother, then it won't be there. But I think they do use it to their advantage, during manufacturing and later on, for serviceability. :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                  Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                  C 1 Reply Last reply
                  0
                  • L Luc Pattyn

                    as always with WMI, it depends on the manufacturers. If they decide not to bother, then it won't be there. But I think they do use it to their advantage, during manufacturing and later on, for serviceability. :)

                    Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                    Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                    C Offline
                    C Offline
                    Code o mat
                    wrote on last edited by
                    #9

                    Thought so really... so basicly there is no common way to get the info he requested, it is most likely he can get it trough WMI but there are no garantees...

                    > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

                    1 Reply Last reply
                    0
                    • C Code o mat

                      I doubt there is a common way to do that, if any at all (i might be wrong and correct me if i am, fellas), maybe check out if WMI[^] has a way, e.g. here[^] it mentions a "serial number" and "bios asset tag", that's probably not for the motherboard though... Here[^] are examples about how to use WMI in C++.

                      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <

                      A Offline
                      A Offline
                      Aseem Sharma
                      wrote on last edited by
                      #10

                      Hi friend. Thanks for your reply. I have changed the plan. I'll use some third party licensing. Regards Aseem

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups