Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Source CD-ROM drive in install script

4 views
Skip to first unread message

Joe Siegler

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
I've got a question - I need Installshield (v5.0) to create a file in
the target directory named cdrom.ini that has one line of text:
D:\support\

I've figured out how to get the file written and all (see code below),
but the problem I'm having is that I need to have the CD-ROM letter be
different based on whatever drive the user has the CD in at the time of
install. See my code:

OpenFileMode ( FILE_MODE_APPEND );
CreateFile ( nvFileHandle , TARGETDIR , "cdrom.ini" );
WriteLine ( nvFileHandle , "D:\\support\\" );
CloseFile ( nvFileHandle );

That writes the file fine enough, but I can't figure out how to get it
to put the drive letter in there in place of 'D'. Anyone have some
code? I took a poke around the help file, and found some stuff about
identfying the CD drive, but I don't know what to do with systems that
have more than one CD drive - I'd rather the code tell me what the
"source drive letter" is.

Help! :)

--
Joe Siegler
Webmaster - 3D Realms
http://www.3drealms.com

Joe Siegler

unread,
Dec 4, 2000, 3:00:00 AM12/4/00
to
Nevermind - I figured it out on my own. :)

OpenFileMode ( FILE_MODE_APPEND );
CreateFile ( nvFileHandle , TARGETDIR , "cdrom.ini" );

WriteLine ( nvFileHandle , SRCDISK ^ "support\\" );
CloseFile ( nvFileHandle );

Joe

0 new messages