[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 602
  • Last Modified:

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 + ':\'),
                     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
mzlxkats
Asked:
mzlxkats
  • 4
  • 4
  • 2
  • +5
2 Solutions
 
marcoszorrillaCommented:
Are you protecting your applications?
Perhaps is more sure the CPU number.

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

0
 
CrazyOneCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
marcoszorrillaCommented:
0
 
marcoszorrillaCommented:
0
 
marcoszorrillaCommented:
I paste the function to obtain the CPU number and dont work, No Text??
Very sorry
Best Regards
Marcos.
0
 
slaviknCommented:
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
 
Lee_NoverCommented:
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
 
mzlxkatsAuthor Commented:
no code?
0
 
slaviknCommented:
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
 
srsrkiCommented:
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
 
srsrkiCommented:
and one more thing,
i wouldn't recomment using anything standard since it rises the chances of your software being cracked
0
 
CleanupPingCommented:
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
 
slaviknCommented:
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
 
Lukasz LachCommented:
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
 
slaviknCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 4
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now