Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As part of an anti-piracy scheme ,I need a routine with wish I can retrieve the serial number of the system's hard disc.
Can any one tell me where I can get one or more of such a routine?
Posted

Do some research on WMI[^]. It is very useful for things like this. More specific link[^] to an appropriate part of WMI.
 
Share this answer
 
There is no one method that reliably retrieves the drive serial number. You have to use a combination of about 4 or 5 different methods, one or more of which will return the serial number of the drive, but no one method works for all drives. Some even require admin rights in order to work at all.

Google for "DiskId32" to find the site for it. On that site, you'll also find the source code that it uses!
 
Share this answer
 
This link[^] may help you. There is source in several languages as well.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900