I wrote a VB2005 utility that must run from a USB drive. I need to write an installer that can install the utility onto a USB Drive so that the program will only run on that one USB Drive.

The idea is that once installed onto the USB drive, if you move the program onto another drive it should realize that it is no longer on the correct drive and not run. But if it is on the correct drive and you move the USB drive onto another system then that is fine, so it should run.

I can get the VolumeSerialNumber of the USB drive but how do I get the installer program to modify the utility program to look for just that particular VolumeSerialNumber. I need the Installer to write the VolumeSerialNumber into the .exe file.

In the old days you could use a special string literal value that you could search for in the compiled program and simply replace it with a new string and so long as they were the same number of characters it would work.

Any Help Would Be Greatly Appreciated!!!
Thank You!