Solved

about disk serial number

Posted on 2002-07-13
16
592 Views
Last Modified: 2010-04-04
hello experts,

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

GetVolumeInformation(PChar(Disk + ':\'),
                     nil,
                     0,
                     @VolumeSerialNumber,
                     MaximumComponentLength,
                     FileSystemFlags,
                     nil,
                     0);
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.

Regards
0
Comment
Question by:mzlxkats
  • 4
  • 4
  • 2
  • +5
16 Comments
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7151227
Are you protecting your applications?
Perhaps is more sure the CPU number.

Best Regards.
Marcos.
0
 

Author Comment

by:mzlxkats
ID: 7151286
yes, but how to get the CPU number?

0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 7151475
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
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7151644
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7151645
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7151647
I paste the function to obtain the CPU number and dont work, No Text??
Very sorry
Best Regards
Marcos.
0
 
LVL 1

Expert Comment

by:slavikn
ID: 7151653
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.
0
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 25 total points
ID: 7151679
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
0
 

Author Comment

by:mzlxkats
ID: 7151973
no code?
0
 
LVL 1

Assisted Solution

by:slavikn
slavikn earned 25 total points
ID: 7152033
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.
0
 
LVL 1

Expert Comment

by:srsrki
ID: 7152151
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.
0
 
LVL 1

Expert Comment

by:srsrki
ID: 7152154
and one more thing,
i wouldn't recomment using anything standard since it rises the chances of your software being cracked
0
 

Expert Comment

by:CleanupPing
ID: 9343067
mzlxkats:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 1

Expert Comment

by:slavikn
ID: 9348874
I've forgotten about the thread. I've already solved the problem.
Have a look at my post on DelphiPages:
http://www.delphipages.com/threads/thread.cfm?ID=89517&G=89413
Please accept if this helps.

P.S.  The code works with IDE and SCSI disks on every Windows.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9460870
mzlxkats,
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 ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:slavikn
ID: 9478399
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.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 151
can't find the executable in Simulator 1 90
enhance the following code 3 31
DBCtrlGrid, Delphi, Scroll 8 14
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question