programmatically obtain the hard disk's serial number from VBA?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lauren Wilson

    programmatically obtain the hard disk's serial number from VBA?


    Discovered this interesting comment on MSDN:

    "To programmaticall y obtain the hard disk's serial number that the
    manufacturer assigns, use the Windows Management Instrumentation (WMI)
    Win32_PhysicalM edia (a class) property SerialNumber."

    I'm sorry to admit it bit I am really undereducated on how to
    incorporate some of the Windows SDK stuff into VBA apps. Anyone know
    of some sample code that will allow us to read the C drive hardware
    serial number? I'm NOT talking about the serial number assigned to a
    drive by the OS, I'm talking about the serial number given by the HD
    manufacturer and encoded on the drive's ROM chip.

    The WHY of this question is too complicated to go into right now.

    Any help or advice will be much appreciated.

    Thanks folks,

    -- LW
  • CDMAPoster@FortuneJames.com

    #2
    Re: programmaticall y obtain the hard disk's serial number from VBA?

    Lauren Wilson wrote:[color=blue]
    > Discovered this interesting comment on MSDN:
    >
    > "To programmaticall y obtain the hard disk's serial number that the
    > manufacturer assigns, use the Windows Management Instrumentation (WMI)
    > Win32_PhysicalM edia (a class) property SerialNumber."
    >
    > I'm sorry to admit it bit I am really undereducated on how to
    > incorporate some of the Windows SDK stuff into VBA apps. Anyone know
    > of some sample code that will allow us to read the C drive hardware
    > serial number? I'm NOT talking about the serial number assigned to a
    > drive by the OS, I'm talking about the serial number given by the HD
    > manufacturer and encoded on the drive's ROM chip.
    >
    > The WHY of this question is too complicated to go into right now.
    >
    > Any help or advice will be much appreciated.
    >
    > Thanks folks,
    >
    > -- LW[/color]

    Try:



    Note: I know that there are ways for customers to get around the use of
    the MAC Address of a network card for registering software. There may
    be ways to get around the HD info as well.

    James A. Fortune
    CDMAPoster@Fort uneJames.com

    Comment

    • Lauren Wilson

      #3
      Re: Re: programmaticall y obtain the hard disk's serial number from VBA?


      Thanks. Unfortunately, the "GetVolumeSeria lNumber" function returns
      the OS generated drive id, not the manufacturers's product serial
      number that is stored on the drive's on-board ROM.

      The OS drive ID WILL change if the user re-format's his HD. The Mfg
      Drive serial number will not. What I need is VBA compatible code
      that will make use of the Win32_PhysicalM edia.SerialNumb er funtion to
      read and return the HARDWARE serial number of a selected drive.
      Of course, the user COULD remove and replace any drive, but that
      happens FAR less often than a re-format.


      On 6 Mar 2006 18:30:21 -0800, CDMAPoster@Fort uneJames.com wrote:
      [color=blue]
      >Lauren Wilson wrote:[color=green]
      >> Discovered this interesting comment on MSDN:
      >>
      >> "To programmaticall y obtain the hard disk's serial number that the
      >> manufacturer assigns, use the Windows Management Instrumentation (WMI)
      >> Win32_PhysicalM edia (a class) property SerialNumber."
      >>
      >> I'm sorry to admit it bit I am really undereducated on how to
      >> incorporate some of the Windows SDK stuff into VBA apps. Anyone know
      >> of some sample code that will allow us to read the C drive hardware
      >> serial number? I'm NOT talking about the serial number assigned to a
      >> drive by the OS, I'm talking about the serial number given by the HD
      >> manufacturer and encoded on the drive's ROM chip.
      >>
      >> The WHY of this question is too complicated to go into right now.
      >>
      >> Any help or advice will be much appreciated.
      >>
      >> Thanks folks,
      >>
      >> -- LW[/color]
      >
      >Try:
      >
      >http://groups.google.com/group/micro...bb45fdfed9d31f
      >
      >Note: I know that there are ways for customers to get around the use of
      >the MAC Address of a network card for registering software. There may
      >be ways to get around the HD info as well.
      >
      >James A. Fortune
      >CDMAPoster@For tuneJames.com[/color]

      Comment

      • Lyle Fairfield

        #4
        Re: programmaticall y obtain the hard disk's serial number from VBA?

        Air Code: (be careful of news client created line breaks)

        Code:
        Function DiskZeroName() As String
        Dim Buffer As String
        Dim PathTxt As String
        Dim FileNumber As Integer
        On Error Resume Next
        Kill "DiskZeroName*.*"
        On Error GoTo 0
        PathTxt = "DiskZeroName" & Format(Now(), "dddmmmddyyyyhhnnss\.\t\x\t")
        Shell "RegEdit /E " & PathTxt & "
        HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\", vbHide
        FileNumber = FreeFile
        Open PathTxt For Binary As #FileNumber
        Buffer = String(LOF(FileNumber), vbNullChar)
        Get #FileNumber, , Buffer
        Close #FileNumber
        Buffer = StrConv(Buffer, vbFromUnicode)
        DiskZeroName = Mid$(Buffer, InStr(Buffer, "Identifier") + 13)
        DiskZeroName = Left$(DiskZeroName, InStr(DiskZeroName, Chr(34)) - 1)
        End Function
        On my laptop this returns
        HITACHI_DK23FA-80.

        I don't know if this is the number you want.
        I don't know if it will work on other machines or other operating
        systems.
        Last edited by zmbd; Apr 28 '15, 12:40 PM.

        Comment

        • CDMAPoster@FortuneJames.com

          #5
          Re: programmaticall y obtain the hard disk's serial number from VBA?

          Lauren Wilson wrote:[color=blue]
          > Thanks. Unfortunately, the "GetVolumeSeria lNumber" function returns
          > the OS generated drive id, not the manufacturers's product serial
          > number that is stored on the drive's on-board ROM.
          >
          > The OS drive ID WILL change if the user re-format's his HD. The Mfg
          > Drive serial number will not. What I need is VBA compatible code
          > that will make use of the Win32_PhysicalM edia.SerialNumb er funtion to
          > read and return the HARDWARE serial number of a selected drive.
          > Of course, the user COULD remove and replace any drive, but that
          > happens FAR less often than a re-format.[/color]

          Lauren,

          Sorry I wasn't able to help. If you find a solution to this problem
          please post it. I am also interested in other's comments about the
          usage of this manufacturer HD ID as a "dongle."

          Thanks,

          James A. Fortune
          CDMAPoster@Fort uneJames.com

          Comment

          • polite person

            #6
            Re: programmaticall y obtain the hard disk's serial number from VBA?

            On Mon, 06 Mar 2006 19:05:12 -0600, Lauren Wilson <nospam@nospam. com> wrote:
            [color=blue]
            >
            >Discovered this interesting comment on MSDN:
            >
            >"To programmaticall y obtain the hard disk's serial number that the
            >manufacturer assigns, use the Windows Management Instrumentation (WMI)
            >Win32_Physical Media (a class) property SerialNumber."
            >
            >I'm sorry to admit it bit I am really undereducated on how to
            >incorporate some of the Windows SDK stuff into VBA apps. Anyone know
            >of some sample code that will allow us to read the C drive hardware
            >serial number? I'm NOT talking about the serial number assigned to a
            >drive by the OS, I'm talking about the serial number given by the HD
            >manufacturer and encoded on the drive's ROM chip.
            >
            >The WHY of this question is too complicated to go into right now.
            >
            >Any help or advice will be much appreciated.
            >
            >Thanks folks,
            >
            >-- LW[/color]

            Some of the earlier hacks no longer work and WMI is the way to use on current systems.

            Easy in script if this is enabled and can be run in admin mode, for example create a file sn.vbs:
            (Scott McNairy)

            Code:
            set svc = getobject ("winmgmts:root\cimv2")
            set objEnum = svc.execQuery ("select * from win32_physicalMedia")
            for each obj in objEnum
            wscript.echo obj.GetObjectText_
            next
            and run this run in command mode (you can shell out to this) for example

            cscript sn.vbs >result.txt

            For VB code you will have to read the documentation yourself probably, or be more successful in
            searching. WMI will work in VB but all the examples are in C++.

            above script ref


            general refs


            and go up and down the tree.

            Oh, I see that there are some WMI routines for disk info in Randy Birch's site VBnet (note this is
            VB, not VB.net) but on cursory inspection these also seem to use scripting.
            Last edited by zmbd; Apr 28 '15, 12:41 PM.

            Comment

            • Lauren Wilson

              #7
              Re: Re: programmaticall y obtain the hard disk's serial number from VBA?

              Thanks p. person. This is a cool way to retrieve what the OS THINKS
              is the actual Mfg SN for drive 0. Since the value is retrieved from
              the Registry, then, by definition, it can be wiped out by a
              reformat/reinstall.

              Please, someone correct me if I'm wrong: The "Win32_Physical Media"
              class of the WMI library, actually reads and returns the drive
              manufacturer's SN FROM the hardware ROM on a specified drive device.
              This would be the serial number/identifier that was burned onto the
              ROM when the drive was made. If so, THAT is what we need. Anything
              less, is no better than what we have now -- and what we have now is
              not adequate.

              Can anyone point me in the right direction on this?

              Thanks again for your help.

              -- LW


              On Wed, 08 Mar 2006 13:35:07 GMT, polite person <sitting@ease.c om>
              wrote:
              [color=blue]
              >On Mon, 06 Mar 2006 19:05:12 -0600, Lauren Wilson <nospam@nospam. com> wrote:
              >[color=green]
              >>
              >>Discovered this interesting comment on MSDN:
              >>
              >>"To programmaticall y obtain the hard disk's serial number that the
              >>manufacture r assigns, use the Windows Management Instrumentation (WMI)
              >>Win32_Physica lMedia (a class) property SerialNumber."
              >>
              >>I'm sorry to admit it bit I am really undereducated on how to
              >>incorporate some of the Windows SDK stuff into VBA apps. Anyone know
              >>of some sample code that will allow us to read the C drive hardware
              >>serial number? I'm NOT talking about the serial number assigned to a
              >>drive by the OS, I'm talking about the serial number given by the HD
              >>manufacture r and encoded on the drive's ROM chip.
              >>
              >>The WHY of this question is too complicated to go into right now.
              >>
              >>Any help or advice will be much appreciated.
              >>
              >>Thanks folks,
              >>
              >>-- LW[/color]
              >
              >Some of the earlier hacks no longer work and WMI is the way to use on current systems.
              >
              >Easy in script if this is enabled and can be run in admin mode, for example create a file sn.vbs:
              >(Scott McNairy)
              >
              Code:
              set svc = getobject ("winmgmts:root\cimv2")
              set objEnum = svc.execQuery ("select * from win32_physicalMedia")
              for each obj in objEnum
                  wscript.echo obj.GetObjectText_
              next
              >
              >and run this run in command mode (you can shell out to this) for example
              >
              >cscript sn.vbs >result.txt
              >
              >For VB code you will have to read the documentation yourself probably, or be more successful in
              >searching. WMI will work in VB but all the examples are in C++.
              >
              >above script ref
              >http://groups.google.com.au/group/mi...2363a8ea2debab
              >
              >general refs
              >http://msdn.microsoft.com/library/de...sicalmedia.asp
              >http://msdn.microsoft.com/library/de...r_hardware.asp
              >and go up and down the tree.
              >
              >Oh, I see that there are some WMI routines for disk info in Randy Birch's site VBnet (note this is
              >VB, not VB.net) but on cursory inspection these also seem to use scripting.
              >
              >
              >
              >
              >
              >[/color]
              Last edited by zmbd; Apr 28 '15, 12:42 PM.

              Comment

              • polite person

                #8
                Re: programmaticall y obtain the hard disk's serial number from VBA?

                On Wed, 08 Mar 2006 13:25:32 -0600, Lauren Wilson <nospam@nospam. com> wrote:
                [color=blue]
                >
                >Thanks p. person. This is a cool way to retrieve what the OS THINKS
                >is the actual Mfg SN for drive 0. Since the value is retrieved from
                >the Registry, then, by definition, it can be wiped out by a
                >reformat/reinstall.
                >
                >Please, someone correct me if I'm wrong: The "Win32_Physical Media"
                >class of the WMI library, actually reads and returns the drive
                >manufacturer 's SN FROM the hardware ROM on a specified drive device.
                >This would be the serial number/identifier that was burned onto the
                >ROM when the drive was made. If so, THAT is what we need. Anything
                >less, is no better than what we have now -- and what we have now is
                >not adequate.
                >
                >Can anyone point me in the right direction on this?
                >
                >Thanks again for your help.
                >
                >-- LW
                >
                >[/color]
                I would post the question in microsoft.publi c.win32.program mer.wmi

                I would have expected that all WMI objects are actually precalculated, to read the actual number you
                would need to be in a driver or with similar privileges. However by analogy with the MAC address, if
                it has been spoofed there is an entry which can tell you this or reset it I forget which.


                Comment

                • david epsom dot com dot au

                  #9
                  Re: programmaticall y obtain the hard disk's serial number from VBA?

                  In MSDOS it was easy to retrieve standard HD information,
                  but in Windows, hardware is virtualised, and you can't get
                  at it.


                  Windows does now provide a path to an interface for HD
                  serial numbers, but it is the SMART drive interface and
                  I don't know what you will get if SMART is turned off,
                  or if you have SCSI disks, or if you have Serial ATA disks,
                  etc.


                  [color=blue]
                  > manufacturer assigns, use the WMI Win32_PhysicalM edia
                  > property SerialNumber."[/color]

                  I've never seen that work, but go ahead and try it:
                  Code:
                  '----------
                  Sub GetPhysicalSerial()
                  
                  Dim obj As Object
                  Dim WMI As Object
                  
                  Set WMI = GetObject("WinMgmts:")
                  
                  For Each obj In WMI.InstancesOf("Win32_PhysicalMedia")
                  Debug.Print "SN: " & obj.SerialNumber
                  Next
                  
                  End Sub
                  '-----------
                  (david)

                  "Lauren Wilson" <nospam@nospam. com> wrote in message
                  news:rmmp025uc6 nlsr231rt6upddu dojsil9su@4ax.c om...[color=blue]
                  >
                  > Discovered this interesting comment on MSDN:
                  >
                  > "To programmaticall y obtain the hard disk's serial number that the
                  > manufacturer assigns, use the Windows Management Instrumentation (WMI)
                  > Win32_PhysicalM edia (a class) property SerialNumber."
                  >
                  > I'm sorry to admit it bit I am really undereducated on how to
                  > incorporate some of the Windows SDK stuff into VBA apps. Anyone know
                  > of some sample code that will allow us to read the C drive hardware
                  > serial number? I'm NOT talking about the serial number assigned to a
                  > drive by the OS, I'm talking about the serial number given by the HD
                  > manufacturer and encoded on the drive's ROM chip.
                  >
                  > The WHY of this question is too complicated to go into right now.
                  >
                  > Any help or advice will be much appreciated.
                  >
                  > Thanks folks,
                  >
                  > -- LW[/color]
                  Last edited by zmbd; Apr 28 '15, 12:43 PM.

                  Comment

                  • Lauren Wilson

                    #10
                    Re: Re: programmaticall y obtain the hard disk's serial number from VBA?

                    Hi David! Thanks for your response.

                    This works perfectly. However, it naturally returns SNs for ALL of
                    the HDs on my system. I need a way to return JUST the primary drive
                    SN (Drive 0). I tried inserting Debug.Print "SN: " & obj.name & ": "
                    & obj.SerialNumbe r, but the Name property returned only empty
                    strings.
                    Is there a way to limit the output to only the SN for Drive 0?

                    Thanks again.

                    -- LW.




                    On Mon, 13 Mar 2006 16:38:48 +1100, "david epsom dot com dot au"
                    <david@epsomdot comdotau> wrote:
                    [color=blue]
                    >In MSDOS it was easy to retrieve standard HD information,
                    >but in Windows, hardware is virtualised, and you can't get
                    >at it.
                    >
                    >
                    >Windows does now provide a path to an interface for HD
                    >serial numbers, but it is the SMART drive interface and
                    >I don't know what you will get if SMART is turned off,
                    >or if you have SCSI disks, or if you have Serial ATA disks,
                    >etc.
                    >
                    >http://vbnet.mvps.org/index.html?code/disk/smartide.htm
                    >[color=green]
                    >> manufacturer assigns, use the WMI Win32_PhysicalM edia
                    >> property SerialNumber."[/color]
                    >
                    >I've never seen that work, but go ahead and try it:
                    >
                    >'----------
                    >Sub GetPhysicalSeri al()
                    >
                    >Dim obj As Object
                    >Dim WMI As Object
                    >
                    >Set WMI = GetObject("WinM gmts:")
                    >
                    >For Each obj In WMI.InstancesOf ("Win32_Physica lMedia")
                    > Debug.Print "SN: " & obj.SerialNumbe r
                    >Next
                    >
                    >End Sub
                    >'-----------
                    >
                    >(david)
                    >
                    >"Lauren Wilson" <nospam@nospam. com> wrote in message
                    >news:rmmp025uc 6nlsr231rt6updd udojsil9su@4ax. com...[color=green]
                    >>
                    >> Discovered this interesting comment on MSDN:
                    >>
                    >> "To programmaticall y obtain the hard disk's serial number that the
                    >> manufacturer assigns, use the Windows Management Instrumentation (WMI)
                    >> Win32_PhysicalM edia (a class) property SerialNumber."
                    >>
                    >> I'm sorry to admit it bit I am really undereducated on how to
                    >> incorporate some of the Windows SDK stuff into VBA apps. Anyone know
                    >> of some sample code that will allow us to read the C drive hardware
                    >> serial number? I'm NOT talking about the serial number assigned to a
                    >> drive by the OS, I'm talking about the serial number given by the HD
                    >> manufacturer and encoded on the drive's ROM chip.
                    >>
                    >> The WHY of this question is too complicated to go into right now.
                    >>
                    >> Any help or advice will be much appreciated.
                    >>
                    >> Thanks folks,
                    >>
                    >> -- LW[/color]
                    >[/color]

                    Comment

                    • Lauren Wilson

                      #11
                      Re: Re: Re: programmaticall y obtain the hard disk's serial number from VBA?


                      Never mind. It appears that Drive 0 is always listed first.



                      On Mon, 13 Mar 2006 13:34:03 -0600, Lauren Wilson <nospam@nospam. com>
                      wrote:
                      [color=blue]
                      >Hi David! Thanks for your response.
                      >
                      >This works perfectly. However, it naturally returns SNs for ALL of
                      >the HDs on my system. I need a way to return JUST the primary drive
                      >SN (Drive 0). I tried inserting Debug.Print "SN: " & obj.name & ": "
                      >& obj.SerialNumbe r, but the Name property returned only empty
                      >strings.
                      >Is there a way to limit the output to only the SN for Drive 0?
                      >
                      >Thanks again.
                      >
                      >-- LW.
                      >
                      >
                      >
                      >
                      >On Mon, 13 Mar 2006 16:38:48 +1100, "david epsom dot com dot au"
                      ><david@epsomdo tcomdotau> wrote:
                      >[color=green]
                      >>In MSDOS it was easy to retrieve standard HD information,
                      >>but in Windows, hardware is virtualised, and you can't get
                      >>at it.
                      >>
                      >>
                      >>Windows does now provide a path to an interface for HD
                      >>serial numbers, but it is the SMART drive interface and
                      >>I don't know what you will get if SMART is turned off,
                      >>or if you have SCSI disks, or if you have Serial ATA disks,
                      >>etc.
                      >>
                      >>http://vbnet.mvps.org/index.html?code/disk/smartide.htm
                      >>[color=darkred]
                      >>> manufacturer assigns, use the WMI Win32_PhysicalM edia
                      >>> property SerialNumber."[/color]
                      >>
                      >>I've never seen that work, but go ahead and try it:
                      >>
                      >>'----------
                      >>Sub GetPhysicalSeri al()
                      >>
                      >>Dim obj As Object
                      >>Dim WMI As Object
                      >>
                      >>Set WMI = GetObject("WinM gmts:")
                      >>
                      >>For Each obj In WMI.InstancesOf ("Win32_Physica lMedia")
                      >> Debug.Print "SN: " & obj.SerialNumbe r
                      >>Next
                      >>
                      >>End Sub
                      >>'-----------
                      >>
                      >>(david)
                      >>
                      >>"Lauren Wilson" <nospam@nospam. com> wrote in message
                      >>news:rmmp025u c6nlsr231rt6upd dudojsil9su@4ax .com...[color=darkred]
                      >>>
                      >>> Discovered this interesting comment on MSDN:
                      >>>
                      >>> "To programmaticall y obtain the hard disk's serial number that the
                      >>> manufacturer assigns, use the Windows Management Instrumentation (WMI)
                      >>> Win32_PhysicalM edia (a class) property SerialNumber."
                      >>>
                      >>> I'm sorry to admit it bit I am really undereducated on how to
                      >>> incorporate some of the Windows SDK stuff into VBA apps. Anyone know
                      >>> of some sample code that will allow us to read the C drive hardware
                      >>> serial number? I'm NOT talking about the serial number assigned to a
                      >>> drive by the OS, I'm talking about the serial number given by the HD
                      >>> manufacturer and encoded on the drive's ROM chip.
                      >>>
                      >>> The WHY of this question is too complicated to go into right now.
                      >>>
                      >>> Any help or advice will be much appreciated.
                      >>>
                      >>> Thanks folks,
                      >>>
                      >>> -- LW[/color]
                      >>[/color][/color]

                      Comment

                      • polite person

                        #12
                        Re: programmaticall y obtain the hard disk's serial number from VBA?

                        On Mon, 13 Mar 2006 13:34:03 -0600, Lauren Wilson <nospam@nospam. com> wrote:
                        [color=blue]
                        >Hi David! Thanks for your response.
                        >
                        >This works perfectly. <snip>[/color]

                        Hi
                        I'm sure all the WMI methods will give the same result but in answer to your worry about whether the
                        result is really the serial number or whether it is just what the OS thinks it is .. see


                        Accessing Device Drivers


                        WDM Provider

                        or http://www.expresscomputeronline.com...chspace1.shtml
                        for an outside overview of how WMI works.

                        Draw your own conclusions! Maybe you should read the refs in reverse order.


                        Comment

                        • Lauren Wilson

                          #13
                          Re: Re: programmaticall y obtain the hard disk's serial number from VBA?

                          Thanks a lot PP! The last article was VERY helpful.

                          We have now tested my WMI code on several Windows PCs, all XP or 2000
                          machines. In every case, the drive ID's returned exactly matched the
                          drive serial number originally provided by the drive mfg! I don't
                          know if this will work on EVERY PC. So far, it looks good.

                          The bottom line for ALL of this is that there is a growing need to
                          identify a particular PC with absolute certainty. This approach may
                          not be the final method, but it seems to move in that direction.


                          On Tue, 14 Mar 2006 06:36:00 GMT, polite person <sitting@ease.c om>
                          wrote:
                          [color=blue]
                          >On Mon, 13 Mar 2006 13:34:03 -0600, Lauren Wilson <nospam@nospam. com> wrote:
                          >[color=green]
                          >>Hi David! Thanks for your response.
                          >>
                          >>This works perfectly. <snip>[/color]
                          >
                          >Hi
                          >I'm sure all the WMI methods will give the same result but in answer to your worry about whether the
                          >result is really the serial number or whether it is just what the OS thinks it is .. see
                          >
                          >http://msdn.microsoft.com/library/de...ce_drivers.asp
                          >Accessing Device Drivers
                          >
                          >http://msdn.microsoft.com/library/de...m_provider.asp
                          >WDM Provider
                          >
                          >or http://www.expresscomputeronline.com...chspace1.shtml
                          >for an outside overview of how WMI works.
                          >
                          >Draw your own conclusions! Maybe you should read the refs in reverse order.
                          >[/color]

                          Comment

                          • david epsom dot com dot au

                            #14
                            Re: Re: programmaticall y obtain the hard disk's serial number from VBA?

                            > The bottom line for ALL of this is that there is a growing need[color=blue]
                            > identify a particular PC with absolute certainty. This approach[/color]

                            It doesn't identify my PC :~) I get a blank for the serial
                            number using that method.

                            (david)

                            "Lauren Wilson" <nospam@nospam. com> wrote in message
                            news:k4pd12dc6v fanj1btomqpdiah gl1k2huca@4ax.c om...[color=blue]
                            > Thanks a lot PP! The last article was VERY helpful.
                            >
                            > We have now tested my WMI code on several Windows PCs, all XP or 2000
                            > machines. In every case, the drive ID's returned exactly matched the
                            > drive serial number originally provided by the drive mfg! I don't
                            > know if this will work on EVERY PC. So far, it looks good.
                            >
                            > The bottom line for ALL of this is that there is a growing need to
                            > identify a particular PC with absolute certainty. This approach may
                            > not be the final method, but it seems to move in that direction.
                            >
                            >
                            > On Tue, 14 Mar 2006 06:36:00 GMT, polite person <sitting@ease.c om>
                            > wrote:
                            >[color=green]
                            >>On Mon, 13 Mar 2006 13:34:03 -0600, Lauren Wilson <nospam@nospam. com>
                            >>wrote:
                            >>[color=darkred]
                            >>>Hi David! Thanks for your response.
                            >>>
                            >>>This works perfectly. <snip>[/color]
                            >>
                            >>Hi
                            >>I'm sure all the WMI methods will give the same result but in answer to
                            >>your worry about whether the
                            >>result is really the serial number or whether it is just what the OS
                            >>thinks it is .. see
                            >>
                            >>http://msdn.microsoft.com/library/de...ce_drivers.asp
                            >>Accessing Device Drivers
                            >>
                            >>http://msdn.microsoft.com/library/de...m_provider.asp
                            >>WDM Provider
                            >>
                            >>or http://www.expresscomputeronline.com...chspace1.shtml
                            >>for an outside overview of how WMI works.
                            >>
                            >>Draw your own conclusions! Maybe you should read the refs in reverse
                            >>order.
                            >>[/color][/color]


                            Comment

                            • Lauren Wilson

                              #15
                              Re: Re: Re: programmaticall y obtain the hard disk's serial number from VBA?

                              On Wed, 15 Mar 2006 09:53:34 +1100, "david epsom dot com dot au"
                              <david@epsomdot comdotau> wrote:
                              [color=blue][color=green]
                              >> The bottom line for ALL of this is that there is a growing need
                              >> identify a particular PC with absolute certainty. This approach[/color]
                              >
                              >It doesn't identify my PC :~) I get a blank for the serial
                              >number using that method.[/color]

                              Interesting. Mind saying what is your OS, and primary HD brand name?

                              [color=blue]
                              >(david)
                              >
                              >"Lauren Wilson" <nospam@nospam. com> wrote in message
                              >news:k4pd12dc6 vfanj1btomqpdia hgl1k2huca@4ax. com...[color=green]
                              >> Thanks a lot PP! The last article was VERY helpful.
                              >>
                              >> We have now tested my WMI code on several Windows PCs, all XP or 2000
                              >> machines. In every case, the drive ID's returned exactly matched the
                              >> drive serial number originally provided by the drive mfg! I don't
                              >> know if this will work on EVERY PC. So far, it looks good.
                              >>
                              >> The bottom line for ALL of this is that there is a growing need to
                              >> identify a particular PC with absolute certainty. This approach may
                              >> not be the final method, but it seems to move in that direction.
                              >>
                              >>
                              >> On Tue, 14 Mar 2006 06:36:00 GMT, polite person <sitting@ease.c om>
                              >> wrote:
                              >>[color=darkred]
                              >>>On Mon, 13 Mar 2006 13:34:03 -0600, Lauren Wilson <nospam@nospam. com>
                              >>>wrote:
                              >>>
                              >>>>Hi David! Thanks for your response.
                              >>>>
                              >>>>This works perfectly. <snip>
                              >>>
                              >>>Hi
                              >>>I'm sure all the WMI methods will give the same result but in answer to
                              >>>your worry about whether the
                              >>>result is really the serial number or whether it is just what the OS
                              >>>thinks it is .. see
                              >>>
                              >>>http://msdn.microsoft.com/library/de...ce_drivers.asp
                              >>>Accessing Device Drivers
                              >>>
                              >>>http://msdn.microsoft.com/library/de...m_provider.asp
                              >>>WDM Provider
                              >>>
                              >>>or http://www.expresscomputeronline.com...chspace1.shtml
                              >>>for an outside overview of how WMI works.
                              >>>
                              >>>Draw your own conclusions! Maybe you should read the refs in reverse
                              >>>order.
                              >>>[/color][/color]
                              >[/color]

                              Comment

                              Working...