Think of something that you wish Authorware could do but it doesn't? Let the our good friends at Macromedia know via the wishlist. Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed. Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list. |
Back
B8003 - How do I tell the letter of the CD-ROM in Windows? by - Joseph Ganci There are several ways
to accomplish this.
1) One common method
is to use whatever installation program you are using to write the CD-ROM
letter to an INI file, which you can then check from within your Authorware
file. Most installation programs will use a variable to return the current
drive letter (from which they're installing from, the CD-ROM), so you can
write this letter out to the INI text file. You then read from the INI text
file from within your startup file to know to which drive letter to jump.
2) Place a file with
a strange name of your creation (something like "xyzuyrk") in the root of
your CD-ROM. Then in Authorware, use a loop to check the file type first of
"d:\xyzuyrk", then "e:\xyzuyrk", etc. until the FileType function returns
something other than 0. 0 indicates file not found, something other than 0
will indicate the file has been found and refers to the file type. See the
manual if you're interested in the list of specific file types. If you want
to be doubly sure, place some content in the strange file and read it in using
ReadExtFile. If it matches what you expect, then you'll know it's the right
file.
3) Finally, and probably
the simplest, is to use Windows itself to tell you the CD-ROM drive through
use of a DLL or UCD. |