I am writing a program using Delphi 6 which I would like to run from a USB flash drive and I want to record the serial number of each flash drive when the software is copied to it for the first time. When the program is opened I want to compare the serial number of the flash drive to the one I recorded when the flash drive software was created. I don't want the serial number of the drive's volume when formatted. This is the hardware serial number. I have found a couple of methods that work but they fail when Vista/Windows 7/8 is used.