Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Product ID (Serial Number)

I have used GetVoulmeInformation API to get the Voulme Serial number of the drives. I used this with different type and it works well. But when i use this with CD-to-CD copied CD ROMS it gives the same volume serial numbers. why? Any solution?. I use this number to make the Product ID for Software. So this make duplicate numbers. Or any other methods I can use ?

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Deploying And Product Serial Number
Hello Everyone,
I am developing a standalone application in VB6. Regarding deployment features of application my client has following requirements.
1) Each CD that is shipped out should have a product ID associated with it.
2) A customer should only be able to install the software on his machine (or for that matter only one machine). Once installed the CD should become somehow unavailable for use by other machines. Since the software is to be shipped to few select customer therefore we can ask the customer to provide some information before we ship the CD to them.

My question is what Installation Software should I look for and who can provide me this functionality rather cheaply.


Product Number
Can someone suggest the best way to generate a new product number when the user adds a new item?

I have a project that the user will be adding new product and I don't want the user to have to come up with a number, I want the program to give them the new number. I was using :
.txtProdID.Text = Format(.Adodc1.Recordset.AbsolutePosition, "0000") , which worked fine, until an item was deleted, that will generate a number that already exists. I am using Access, I know there is autonumber, but I was told, in class once, that it isn't good to use this, not sure why. (she told us it we used it we would be marked down) .

And if I do use autonumbering, how do I get that number to show in a lable when they start to add a new product?

Or is it best just to let them enter a number?

any ideas are appriciated

Hard Drive Serial Number Or CPU Serial Number
Dear Sir,

I want to got the hard drive serial number ,not volume number. If it is not possible than how can i got the Processor Serial Number.


Please Help!!! Label To Show Number Of Rows In A Product Table
Please help me! How do I write the codes for putting a label on a form to show the number of rows in a data table. For Example, if there are 100 rows, the label should display "100". And the caption on this label should be updated each time a new row is added and each time a row is deleted. Any help is appreciated!!

Microsoft's Product ID Number For Embedded Visual Tools
How can I determine the product ID of Embedded Visual Tools. The ID is displayed during the install, but I would like to get it without uninstalling and reinstalling.

Not The Volume Serial Number But Hard Disk Serial?
I try to read the hard disk serial number, not the volume serial number through GetVolume..... api (cos the vol ser num changed when format disk and can be changed in many different ways). Is there any way to do it in VB6? PLS Help!

HDD Serial Number And BIOS Serial Number

Who know how to get HardDrive serial Number and BIOS serial number? I search this forum, but I found only how to get parition serial number or to use smardrv, for BIOS wath I found is run only on Windows 98, but fail on XP. Some of this are not run on Windows98 (like smartdrv or older systems). Some one know some API that return this serial numbers and run on Windows98 and XP with or without smartdrv? And BIOS serial number?

Retrieve Hard Disk Serial Number Using VB [Not Volume Number]
I need help in reading the Hard Disk Serial Number [Not the volume number] using VB. Currently I am using VB5.

I have found a site that has the program to read the serial number but it is written in C++.

Can anyone convert it to a DLL or has any other solution for it.

The site is

Thank you.

Serial Number
Hi again!

My problem: I have an application that wants to ask after 1st time installation for a serial number. So, my problem is the generating of a serial number. Do you know an algorythm that can generate and decode a serial number? Like the serial for win2k... thanks!

Serial Number
how do people have their software locked with a serial number?
and how do i implent one of them into mine? lame term if you can please?

HD Serial Number
Hello World!
I'm a new user of Extreme-VB and I'm very sorry for my English, but I need help.
Could I read the serial number of an hard disk in visual basic?

A kiss from Italy,

Visual Basic Programming, SQL Server, Windows NT, Microsoft Access and many more!

API To Get Serial Number...
Hello EveryOne,
I want to access the processor and get its serial number, or the serial number of the mother board or the hard disk drive. can any one tel me about any API function which can solve my problem??
Thanks A Lot.


CPU Serial Number
Hello people. I need help about getting CPU serial number with visual basic. can you please help me... All helps appreciated. Thanks..

Help About Serial Number Cd
hello my frinds
i am many happy and glad For registration aboard this site I am very faraway than you but my heart is here into site vbforums .i am sorry i cannot good speak & write english but good read . enyway ..
i have many problems in vb6 please help me . i want serial number cd on cd in center cd i think this serial is factory made cd serial number and name or model cd . second problem i need date burn cd after write cd .
last need me is serial number ( cd empty ) befor write burn into cd
i attach image and write on image my problems
thank you very much please help me.............
i wait you

Serial Number
dear all...

i know...maybe my request is not related into this forum. but honestly...i don't know where i can find my answer...this is the story:

one of our old application is using ActiveXperts SMS and PagerToolkit Ver3.21 (file name "asmssvr32.exe"). when the former programmer is passed away, he brought the license number with him. Now we have difficulties for editing and re-installing the program according the adjustment into new current condition, because the serial number is LOCKED and we can found the license or documentaion about it. now it's my responsibilities...but i almost desperate. can you help me please....i need a serial number.

i try to send you a copy of software...but yahoo not give a permission for an exe file...

please...please...please...i need it...or the company will fired me....

thank you

Get HDD Serial Number
Hi all,
since some of my clients are tring to f**k with me I want to add a license lock of the software I am providing. Since this is a server-client system I want to lock the software for the HDD it is used on. The user will have to send me an code generated upon the HDD serial number i will return him a code that will be stored in the registry.

I know this can be made, because I have seen a similar solution in .NET, but i can't find the API function

PLS I need clue really urgent
Thanks folks

Serial Number
I would like to know, how to do deployment and package with serial number?Give and idea

Hdd Serial Number
I am getting different HDD. Srl Numbers in Win XP and Win98, when i ran the code for getting the Slno of HDD. Is there any way to get Common No for both OS. Pls...............

HD Serial Number
Does anyone know how to obtain the manufacturer hard drive serial number? I don't want the one that is assigned by Windows which is also the one that is retrieved by the GetVolumeInformation API. I want the unique serial number that is assigned by the manufacturer.

I've seen examples with C# online, but I need this in VB6. Thanks.

HDD Serial Number - How?
How can I get the harddrive serial number
and also make sure it is from the first harddrive?
(Copy protection)

Get Serial Number
How I get the serial number of processor in Win98

Cpu Serial Number
I need vb code to obtain "CPU seial number".

Serial Number
Hi Someone knows why serial number return for hard disk or CD-Rom is not the same fram different OS ex. ME, NT XP

and there is something to do to correct this problem....?



Getting The Serial Number Of A Cd
I wanted to know whether there is any way in vb (may be with api) to get the serial number of a cd that is inserted into a cd drive. I know how to get the drive type (whether it is a cd drive or not), by using the api "GetDriveType". But does anyone know how to get the serial number of a cd. It is a hex number

eg A179-F806

Thanks in advance.

Cd With Serial Number
i have go through few threads on serial number and stoping from install the program by using the

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

Private Sub Command1_Click()
Dim Serial As Long
'Get the volume information
GetVolumeInformation "e:", dummy, 255, Serial, 0, 0, dummy2, 255
MsgBox Serial

End Sub

it may sound crazy but i need t know...
can we have our own serial number on cd
if not how can i know all the serial number of my cds(software written)

do any one have program which check for the serial and does not allow the program to procced....

thanks in advance

How Can I Get A CD Serial Number?
Say the CD drive is "d:", how can I get the serial number of the CD that's in drive d?

Serial Number
I want to make one of my products shareware and am trying to develope a way to generate serial numbers.

I thought a combination of the OS and the hard drive size, but then if the user upgrades their OS or gets a new hard drive, they'll have to re-register the software. I could always have a database so I can know if they've already registered and send them a new one, but that's a hassle.

What would be a good way to generate serial numbers?

CPU Serial Number...
Is there a way to get the ID # of the CPU, much like you would of the HDrive, in VB?

Serial Number
How can I get a serial number for my records printing in datareports???

Thanks guys...

Having A Serial Number
I would like to put a serial number into my product so that it will not work without this or the user has to obtain this number inorder for the product to work. Has anyone any ideas in how i do this


Serial Number
Hello everyone (I'm actually up before noon ), anyways..I've got this program, someone sent it to me and it changes the serial number on your computer. It's a real program and all, no virus, or anything. I was wondering if changing your serial number will harm the computer at all in any way?


Serial Number With Api
I try to get the volume serial number information by using an Api:

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

Sub Something()
r& = GetVolumeInformation(Drive$, VolName$, vLen&, VolSerial&,
ComponentLength&, Flags&, fSystem$, fLen&)
End Sub

The strange things are the following :
- vLen, VolSerial, ComponentLength and Flags will be returned by this
function, not the other values.
- by executing the same code within a vbw/dll or a vbp/exe, the VolSerial is
NOTsystematically the the same.

My configuration is as follows:
- two hard disks, C (fat 16) and D (ntfs), hard disk C has logical drives
numbered E, F... (all fat 16).

The Visual basic Programme is installed on physical drive D.

If vbp/exe and vbw/dll are installed on logical drive E, no problem: the
serial number given by the api-function is identical for both vbp/exe and

If vbp/exe and vbw/dll are installed on logical drive F, a problem arises :
the serial number given by the api-function is different for vbp/exe on the
one hand, and vbw/dll on the other.

Does somebody knows how te explain this ? The serial number is of course
used for protecting the program. The explanation is important when compiling
the program and testing it on a "clean" disk drive.

Willibrord OOMEN

Serial Number
Hi All
Does any one know how to get the Serial Number of the computer via VB or
I would like to record it for tracking purpose in the company. SiSoft
Software can do it so there must be a way !


Serial Number
Is there a way to get a serial number of a processor serial number?
If there is more than 1 processor how do i get the main processor serial number?



I never think of the future - it comes soon enough.
Albert Einstein

Serial Number
Hey guys, I've been writing a program, but want to try to keep it secure.... I wrote this little code, to randomly make a serial number...

Dim Part1 As String
Dim Part2 As String
Dim Part3 As String
Dim Part4 As String
Dim TheChar As String
Dim X As Integer

Randomize Timer

For X = 1 To 4
    Part1 = Part1 & Chr(Int(Rnd * 25) + 65)
Next X

For X = 1 To 4
    Part2 = Part2 & Chr(Int(Rnd * 25) + 65)
Next X

For X = 1 To 4
    Part3 = Part3 & Chr(Int(Rnd * 25) + 65)
Next X

For X = 1 To 4
    Part4 = Part4 & Chr(Int(Rnd * 25) + 65)
Next X

TheChar = Mid(Part1, Int(Rnd * 3) + 1, 1)
Part1 = Replace(Part1, TheChar, Asc(TheChar))

TheChar = Mid(Part2, Int(Rnd * 3) + 1, 1)
Part2 = Replace(Part2, TheChar, Asc(TheChar))

TheChar = Mid(Part3, Int(Rnd * 3) + 1, 1)
Part3 = Replace(Part3, TheChar, Asc(TheChar))

TheChar = Mid(Part4, Int(Rnd * 3) + 1, 1)
Part4 = Replace(Part4, TheChar, Asc(TheChar))

MsgBox Part1 & "-" & Part2 & "-" & Part3 & "-" & Part4

That code aint bad, I mean it produces a totally random key. But I'm looking for something much better. That will come up with the same kinda code, but its based on the users computer, so other people can't use it.....

I had an idea, but i'd be too much of a pain in the ass... anyone got ideas?

How To Get The CPU Serial Number

How to get the CPU Serial No thru vb? any idea?


Edited by - pmmbala1976 on 2/7/2004 10:44:53 AM

How Can I Ge My CPU Serial Number In VB 6.0?
How can I ge my CPU serial number in VB 6.0?
OR how any other idia is their for software pircy security, & one and last one how can create a demo(limited period) package in VB?

Get Cd Serial Number
is it possible to get Serial Number of Compact Disct ??
Edit : Physical Serial number Not Logical Serial Number generated by nero or other software. i have get logical serial number using getvolumeinformation api , but i need Physical serial number , written on cd label, pls , it's critical for me if yes how ??
thanx in advance

It May seem Impossible, But Possibly We don't know the way how to reach there ????

Edited by - wwwdirzala on 12/22/2004 5:35:45 AM

-HDD Serial Number

The following API call is used to retrieve serial number from the HDD pertaining to the specified root path.

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

Problem is i am trying to retrieve the serial number from HDD on a server for security purposes, but the server will not cooperate, i guess for security reasons. Anyone got any ideas, or done this, or is there any other information that uniquely identifys a PC at server level that is available from across a LAN?




"Only after every tree has been cut down, after
every river has been poisoned, after the last
fish has been caught, only then will man
realise that money cannot be eaten." - Mosa 1903

Edited by - a4andy on 5/24/2005 6:12:29 PM

Getting CPU Serial Number
Hi Friends,

Please tell me any way to retrieve the CPU's serial number or HDD or motherboard number.

If there is any API for these things.

Thanks in advance.

CD Serial Number
Hi everyone,

how to get CD serial number from VB.?

To be more specific i want have my program in a CD and when run it should give me the serial number of the CD in which it is residing...

I welcome one and all to help in this regard....


Have nice time...........

How To Create A Serial Number?
How can i generate a serial number before installation is begin for a program? Do i need to create a coding for it? Please advice

Packaging With Serial Number
i'm doing a thesis project. This requires a serial number for the user to insert so that it will be a legal software to be used. Otherwise, uses as a shareware. Can anyone tell me any software package can do it? Or do it directly in VB?

Harddrive Serial Number
Hi All,

Just a quick question. Does anyone know if the hard drive sirial number is the same size for each computer?



Read Hdd Serial Number

I would like to read the serial number of a disk drive and save it as part of backup data entry for a program. The backed up data would be stored on another PC. If the first PC's OS crashed, I would have to recover from the backup.

But I would want to make sure the system on which recovery is being done is the same as the one on which the program was first run. This would be done by checking the disk serial number included in the original backup (or any other immutable data possible) .

Any ideas ?

Electronic Serial Number (ESN)
Does anyone here have any idea of how to do a hexadecimal conversion of the ESN for cellular phones? I am in the need to convert a large amount of phone records ESNs that are in hexadecimal format to decimal format and I have no idea what the equation is. I have tried searching several times for it and emailed cellular phone services and they don't know. I have a convertor for the website but it is written in JavaScript and I can't make heads or tails of it anyway (I got it from a miscellaneous site that had it at and used it as is). There are also a few other sites that have a convertor for ESN conversions but I am tyring to find the actual math equation so I can use it in vb.

Now keep in mind this is not, repeat this is not a simple base conversion of hexadecimal to decimal. An ESN conversion uses a completely different algorithim. To further explain a hexadecimal ESN is made up of 8 characters, numbers 0-9 and the letters A-F. When it is converted to the decimal equivalent it will ALWAYS, ALWAYS be 11 digits long.

Anyway if you know of this elusive equation or have existing code that displays the equation than please reply with it. Thank you.

SD Memory Serial Number

I'm trying to get the Unique Serial Number of an SD (Secure Digital) Memory Card, I know how to get the volume information and the like. From reading the specification for the SD Card, I do know each has such an Unique ID. After doing many search here, google, and other web sites I haven't been able to find the answer.

Thanks as always for any help you can provide

Multiple Serial Number's - Please! :)
Hello all. I am getting through this problem but ran into another wall. This is my code below.

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
Private Sub Form_Load()
Dim strSerial As String
strSerial = GetSerialNumber("C:")
If strSerial <> "137773915" Then Unload Me
End Sub
Private Function GetSerialNumber(strDrive As String) As String
Dim serialnum As Long
Dim res As Long
Dim Temp1 As String
Dim Temp2 As String
Temp1 = String$(255, Chr$(0))
Temp2 = String$(255, Chr$(0))
res = GetVolumeInformation(strDrive, Temp1, Len(Temp1), serialnum, 0, 0, Temp2, Len(Temp2))
GetSerialNumber = Trim(Str(serialnum))
End Function
This will let only the users I want to to be able to open the form. So on form load it will only let people in it if their number is there. This code is amazing but the only problem is how can I make it so it is 2 numbers instead of just 1. I mean so instead of jsut that number in the code now I want my other friend we will say to be able to use it. I tried doing:
If strSerial <> "137773915" Then Unload Me
again but it will unload even though my number is correct. So it seems if your hard drive number is not all of them it will not load. So I am looking for some help so I can add mroe then 1 persons number to be able to open my program. Well if you can get this for me you would be god. Hehe. Well thank you in advance for all your help and its appreciated greatly. Thank you all and have a good one.

Cdrom Serial Number
Im a newbie here.
I was wondering if there is any way to access the unique Serial number on every CDROM and then store it as a variable in the user's hardDisk.
Any help will be greatly appreciated.

Copyright 2005-08, All rights reserved