about disk serial number

hello experts,

I wrote a program,I want to collect the hard disk No , the code i use is as follows:

GetVolumeInformation(PChar(Disk + ':\'),
SerialNumber := Format('%.4X-%.4X', [HiWord(VolumeSerialNumber), LoWord(VolumeSerialNumber)]);

But I found whenever the disk is formatted, the volume number will be changed, how can i get a disk information which will be unique and never be changed.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

Lee_NoverConnect With a Mentor Commented:
a good protection is ProActivate from www.turbopower.com
it's commercial but not very expensive
and you can 'communicate' with the protection
another good one is ASProtect, with kinda the same features
Are you protecting your applications?
Perhaps is more sure the CPU number.

Best Regards.
mzlxkatsAuthor Commented:
yes, but how to get the CPU number?

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Actually mzlxkats there is no sure fire way of protecting your applications. People can and do upgrade there CPU and/or their mother board. Same holds true with any other device that you may want to use for serial or checksum verifications. You might do something that MS has implemented with Windows XP and activation codes. Which is to take a cumulative approach to several devices unique ID's pooled together in conjuction to the serial number of the OS. The way MS does it is that some devices can be changed without it causing the alarm bell to go off so to speak. But changing several devices does sound the alarm bell and one has to contact MS and to get another activation code. If a customer contacts MS too many times about the getting another activation code MS will at some point say NO thinking the user is loading the OS on more then one machine but only has 1 license.  

The Crazy One
I paste the function to obtain the CPU number and dont work, No Text??
Very sorry
Best Regards
If you REALLY want to protect your software use dangles:
   WIBU-BOX: http://www.wibu.com
   HASP: http://www.ealaddin.com
This is a hardware key. Without it, the user cannot run your programs.
mzlxkatsAuthor Commented:
no code?
slaviknConnect With a Mentor Commented:
Once ago, I tried to find such code, but there was a problem that if the disk is IDE: there is one way. If SCASI: another way. I didn't manage to do so. I will be thankful if someone will help with finding the code.
Well if you really want to protect your application, that could be difficult.

you could make a web database and let your program connect to it and make sure that your serial number is OK.

you could easily detect when a dial-up connection is established.

you could combine system hard drive number, cpu number, windows serial number, cd-rom serial number etc. for which I believe some codes exist on the net and make a condition for example when two of them change from initial registration that you have to verify your code.

it's the similar way that microsoft protects its windows and office xp and still they got cracked and showed up at the pirates in july (yes, win xp pro build 2600).

those hard-keys can also be cracked (take for example ArcInfo).

I'm not sure about the size of your app or the type of shipping but I've seen some dictionaries comming on diskettes with on special faulty diskette included, except that last disk was damaged intentionally. Cracking the program  and making it not search for the diskette would be difficult since it's written in FoxPro and it's got a weird structure. It's stored in a half encrypted DLL which is started by a small EXE and the dll is loaded and decrypted manually by what I believe was found on the disk. It took a programmer a lot of assembly code anyway.

You can do what's done on a FIFA 2000 CD (which also got cracked), that is check for the cd-type in the drive, and read it's manufacturer, check session order and everything. There also exists something called securom laserlock and similar. (also cracked)

Well I hope I've given you some ideas.

Good Luck.
and check www.astalavista.com for some more ideas.
and one more thing,
i wouldn't recomment using anything standard since it rises the chances of your software being cracked
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
I've forgotten about the thread. I've already solved the problem.
Have a look at my post on DelphiPages:
Please accept if this helps.

P.S.  The code works with IDE and SCSI disks on every Windows.
Lukasz LachCommented:
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: split points between Lee_Nover http:#7151679 and srsrki http:#7152151

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --


EE Cleanup Volunteer
The question was:
But I found whenever the disk is formatted, the volume number will be changed, how can i get a disk information which will be unique and never be changed.

I gave the answer to it (which was tested) and I think IT should be accepted as the correct answer.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.