Solved

about disk serial number

Posted on 2002-07-13
16
596 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

724 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