Some motherboards will have the serial number in the BIOS setup. Also, the
hard drive manufacture's error detection utility (usually a free download)
will usually be able to give you the serial number of the hard drive.
--
Wayne Morgan
Microsoft Access MVP
"Jason Frazer" <anon...@discussions.microsoft.com> wrote in message
news:57C5CD19-97EF-4B42...@microsoft.com...
> How can i get the serial number off of the hard drive or motherboard?
>
> Thanks
> Jason
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
Public Function GetSerialNumber(strDrive As String) As Long
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPD...@Allapi.net
Dim Serial As Long, VName As String, FSName As String
'Create buffers
VName = String$(255, Chr$(0))
FSName = String$(255, Chr$(0))
'Get the volume information
GetVolumeInformation strDrive, VName, 255, Serial, 0, 0, FSName, 255
'Strip the extra chr$(0)'s
' VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1)
' FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1)
'MsgBox "The Volume name of C:\ is '" + VName + "', the File system name
of C:\ is '" + FSName + "' and the serial number of C:\ is '" +
Trim(Str$(Serial)) + "'", vbInformation + vbOKOnly
GetSerialNumber = Serial
End Function
--
Regards,
Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
--
Wayne Morgan
Microsoft Access MVP
"Jason Frazer" <anon...@discussions.microsoft.com> wrote in message
news:3D0E6505-38C5-42E6...@microsoft.com...
> lol. Funny!!! I know this.... I wish it was that simple.
> I want to find the serial number from one of the devices to set up a
registration form.
> That would require the user to enter a key number that is generated from
the serial number.
> So the sensitive information in the database can not be distributed
without authorization
> Opening the case wil not work for this.
>
> Thanks
> Jason Frazer
>
That works great.
Jason
"Adrian Jansen" <q...@noqqwhere.com> wrote in message
news:4043cbd6$3...@duster.adelaide.on.net...