Solved

about disk serial number

Posted on 2002-07-13
16
589 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
Comment Utility
Are you protecting your applications?
Perhaps is more sure the CPU number.

Best Regards.
Marcos.
0
 

Author Comment

by:mzlxkats
Comment Utility
yes, but how to get the CPU number?

0
 
LVL 44

Expert Comment

by:CrazyOne
Comment Utility
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
 
LVL 3

Expert Comment

by:marcoszorrilla
Comment Utility
0
 
LVL 3

Expert Comment

by:marcoszorrilla
Comment Utility
0
 
LVL 3

Expert Comment

by:marcoszorrilla
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:mzlxkats
Comment Utility
no code?
0
 
LVL 1

Assisted Solution

by:slavikn
slavikn earned 25 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now