Software
Java
JavaScript
Delphi
HomeDelphi

Getting The Hard Drive Serial Number

Click to select the code.  Use Control-C to copy it to your clipboard. Help

Comments

Every hard drive has a distinctive Volume Serial Number, with the chances of any two drives you encounter having the same serial number astronomically high.  For this reason, the Volume Serial Number is often used as part of copy protection schemes.  One caution is that operating system re-installations and upgrades may change a Volume Serial Number, and formatting certainly will.

In this example, the serial number for drive C: is returned in the string variable TheSerial Number, converted to hexidecimal format as the integer format is rather unwieldy.  TheSerialNumber will contain an empty string if the drive is unavailable.

.

Copyright 2001 - 2012 by CodeFoot.com and OECCorp.
The 2012 Evolution™


LegalPrivacyCodeFoot.com is an OEC InterNET Group site.SupportNotices
CodeBrain.com BrainCode.com CodeFoot.com CodeBelly.com CodeLifter.com
PopUpWorks.com Droiddd.com etLux.com OECCorp.com
TrayApps.com DavidSosnowski.com MicroTicker.com