Determine if an application is running from a CD
I once had a requirement to do exactly the same thing. I never could find a foolproof method for determining whether the app's volume was a CD; however, I got pretty close by cheking the following 4 things about the volume:
* Does the volume have the name I expect?
* Is the volume "hardware locked"?
* Is the volume ejectable?
* Is the volume's driver number different from 5? (5 is the floppy disk driver)
If the answer to all 4 questions was "Yes," then I concluded that the app's location was on the CD. It is still possible to fool this system (for example, by putting the app onto an appropriately title Zip disk, then locking the disk), but it worked pretty well. If this looks like something you might want to pursue, I'll dig up my old code that did this.