Results 1 to 5 of 5

Thread: Identify PC

  1. #1

    Thread Starter
    Addicted Member Vegeta's Avatar
    Join Date
    Jul 2002
    Posts
    159

    Question Identify PC

    Is there a way to get an unique Identifier of a Computer?... like a vendor code of the processor or the harddisk...
    thanks

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    This will get the hard disk serial number.

    VB Code:
    1. Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
    2.  
    3. Public Function GetSerialNumber() As Long
    4.  
    5.     Dim strVolumeBuffer As String
    6.     Dim strSysName As String
    7.     Dim lngSerialNumber As Long
    8.     Dim lngSysFlags As Long
    9.     Dim lngComponentLen As Long
    10.     Dim lngResult As Long
    11.    
    12.     strVolumeBuffer$ = String$(256, 0)
    13.     strSysName$ = String$(256, 0)
    14.     lngResult = GetVolumeInformation("C:\", strVolumeBuffer$, 255, lngSerialNumber, _
    15.             lngComponentLen, lngSysFlags, strSysName$, 255)
    16.                  
    17.     GetSerialNumber = lngSerialNumber
    18.    
    19. End Function

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    There is nothing on a PC that will remain completely unique throughout the life of a PC. Computer Names can get changed, hard drives can be swapped out, etc.

    There should be a tag somewhere on the outside of the PC with the actual PC serial number, but this is not something you can obtain programmatically.

  4. #4
    Hyperactive Member
    Join Date
    May 2002
    Location
    Wisconsin, USA
    Posts
    279
    If you could get and ID or Serial number of the processor that would probably be more usefull. Most people don't buy a new processor very often, and usually when they do they just buy a whole new computer.

  5. #5
    New Member
    Join Date
    Apr 2000
    Posts
    2

    Serial ID of Server (or Network) Drive

    Originally posted by MartinLiss
    This will get the hard disk serial number.

    VB Code:
    1. snipped for the sake of brevity...
    It doesn't seem to work consistently for network drives. Does somebody have code demonstrating the ability to consistently get the serial number of network drives as well as local drives in W97 to WordXP?

    Thanks!
    ck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width