Sandeman
asked on
Refer to files on CD-ROM
I have a VB project that i want to install on harddisk. When it is installed people can open it in the Startmenu. When they click on a button i want to start a file on the CD-ROM. How can i refer to the "CD-ROM-files". Most of the times it is D but sometimes it is E or F.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TWO Excellent solutions.. pick one.. <smile>.
NOTE: Watch your CursorType, CursorLocation and LockEdit when reading MDB data from a CDRom. Your access has to be Exclusive.
NOTE: Watch your CursorType, CursorLocation and LockEdit when reading MDB data from a CDRom. Your access has to be Exclusive.
ASKER
Thank you for your answer Erick. There are only a few who could answer a question as effective as you...
Add "Windows Scripting Host" in Project References.
here some code:
DIM objFSO as Scripting.FileSystemObject
DIM objDrive AS Scripting.Drive
SET objFSP = NEW Scripting.FileSystemObject
FOR EACH objDrive in objFSO.Drives
IF objDrive.DriveType = "CDRom" THEN
DEBUG.PRINT objDrive.DriveLetter
END IF
NEXT
Hope this helps