PDA

View Full Version : Require CD to launch application


jerilyn
11-08-2005, 01:16 PM
Is there a way to require that the application CD ROM drive exist in the drive upon launching my AMS application? Thank you.

rhosk
11-08-2005, 01:50 PM
Are you providing an install for this application?

jerilyn
11-08-2005, 01:59 PM
Are you providing an install for this application?

Yes, the application will be installed to their hard drive but I was hoping to be able to read the name of the CD ROM drive or some other file name that is present on the CD ROM. Unless you know of a better way. Thanks.

Brett
11-08-2005, 02:46 PM
Do this:

- Store a specific file on the CD-ROM
- When your AMS60 app runs, use Drive.Enumerate (http://www.indigorose.com/webhelp/ams60/Program_Reference/Actions/Drive.Enumerate.htm) to enumerate the system drive, Drive.GetType (http://www.indigorose.com/webhelp/ams60/Program_Reference/Actions/Drive.GetType.htm) to pick out CD-ROM drives (DRIVE_CDROM), and then File.Find (http://www.indigorose.com/webhelp/ams60/Program_Reference/Actions/File.Find.htm) to see if the file exists on the drive. You could even use File.GetCRC (http://www.indigorose.com/webhelp/ams60/Program_Reference/Actions/File.GetCRC.htm) to see if it is the exact file you are looking for.