Motherboard Serial Number checking

DCrake

Remembered
Local time
Today, 17:26
Joined
Jun 8, 2005
Messages
8,623
Hi all,

I have attached a small app (part of a larger one) it reads the information about the computers hardware and software. However on my laptop is is not finding the motherboard serial number for some reason. Can you try it on your machines and tell me if it retrieves it or not.

David
 

Attachments

Glad to be able to answer one of your threads. All fields for me are filled out.
 
Thanks for that, must be my laptop
 
Thanks for that, must be my laptop

From what I remember, in the CMOS, you can turn off the display of the serial number because some people are worried about privacy. You might need to check the setting on the laptop.

I could not get your DB to run. I have a missing reference. What OS is required?
 
Last edited:
Basically what I am trying to do is to create a more professional Activation Key generator based on the installation pc/laptop. I want to make the installation only possible on the designated pc. The user will send me footprint details which will generate an activation key, which I will provide, then they activate the product. If they try and install it on another pc/laptop they will need a new activation key because the footprint details will be different.

I was planning to use the CPU serial number , motherboard serial number and maybe the O/S serial number to generate the activation key. But as you say the CMOS may have the motherboard SN disabled. I could really do with a bit of code that I can generate an activation key, would like it to be similar to MS 6 times 5 mixed numbers and letters. If you know of any would appreciate the hand up, don't want to reinvent the wheel so to speak.

David
 
David,

I do have a key code generator example or two. I will do a search of my code archives. I will return shortly ...
 
Thanks, your key generator, one question: can this code be copied sucessfully into VB easily or do you know of any issues that may be relevant. Assuming you are conversant with VB, which I assume you are. Or conversely do you have a VB version? This is ultimately going to be in VB6.

David
 
Thanks, your key generator, one question: can this code be copied sucessfully into VB easily or do you know of any issues that may be relevant. Assuming you are conversant with VB, which I assume you are. Or conversely do you have a VB version? This is ultimately going to be in VB6.

David

The VBA code came from a conversion from VB. Here is the original VB code:

Generate/Validate License Keys Based on User Name
 
is this working now, dc?

i have this sort of validation in one dbs (obtained from here) - i can post the code again if you still need it
 
is this working now, dc?

i have this sort of validation in one dbs (obtained from here) - i can post the code again if you still need it

I would like to see it. can you post it or a link to where you found it?
 
there we go

i just realised this is HDD, not motherboard -
Is this different?
I assume HDD is still OK for this purpose anyway

Code:
Option Compare Database
Option Explicit

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

Public Function getHDD() As Long

Dim strVolumeBuffer As String
Dim strSysName As String
Dim lngSerialNumber As Long
Dim lngSysFlags As Long
Dim lngComponentLen As Long
Dim lngResult As Long

strVolumeBuffer$ = String$(256, 0)
strSysName$ = String$(256, 0)
lngResult = GetVolumeInformation("C:\", strVolumeBuffer$, 255, lngSerialNumber, _
lngComponentLen, lngSysFlags, strSysName$, 255)

getHDD = lngSerialNumber

End Function
 
there we go

i just realised this is HDD, not motherboard -
Is this different?
I assume HDD is still OK for this purpose anyway

Code:
Option Compare Database
Option Explicit

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

Public Function getHDD() As Long

Dim strVolumeBuffer As String
Dim strSysName As String
Dim lngSerialNumber As Long
Dim lngSysFlags As Long
Dim lngComponentLen As Long
Dim lngResult As Long

strVolumeBuffer$ = String$(256, 0)
strSysName$ = String$(256, 0)
lngResult = GetVolumeInformation("C:\", strVolumeBuffer$, 255, lngSerialNumber, _
lngComponentLen, lngSysFlags, strSysName$, 255)

getHDD = lngSerialNumber

End Function

Thanks! :D
 
I tried the sample demo I posted in #1 on another laptop and still got Unknown value. Just wondering if it is me. I converted the Access app you sent me to vb and got what I wanted out of it. Just working out the logic of how to incorperate it. At present it is gathering the CPU serial number and the BIOS model to authenticate the installation. However, I did notice that there was only one character difference between two different CPU sn's on two different Toshiba laptops.

Is there a way to find out if the CMOS has prevented the motherboard sn from being detected?

David
 

Users who are viewing this thread

Back
Top Bottom