I've seen this one asked a few times on the newsgroups: How do you get the serial number of a disk? This function shows you how to do that. It returns the same serial number as you see on the "Volume Serial Number" line when you type DIR in the DOS box.
functionGetDiskSerialNumber(Disk: char): string; { function to return the volume serial number of a given drive letter. } var VolumeSerialNumber, MaximumComponentLength, FileSystemFlags: DWORD; SerialNumber: string; begin ifnot DiskInDrive(GetDriveNumber(Disk)) then begin Result := 'Invalid drive letter or no disk in drive: ' + Uppercase(Disk) + ':\'; Exit; end;