You can check all possible drivies in the loop until you find CDROM
Declare Integer GetDriveType in Win32API String
lcCDROM = Null
FOR lnI=Asc("A") To Asc("Z")
IF GetDriveType(Chr(lnI)+ ":") = 5
lcCDROM = Chr(lnI)
EXIT
ENDIF
ENDFOR
? lcCDROM
>Hi Nigel,
>
>I tried this method however, it returns a .T. when it
>finds the cdrom drive and only if I direct it to it.
>
>I need to find a user's cdrom drive name, ie d:\ and assign
>that drive letter to a path statement for my program.
>
>Any thoughts? Thanks and have a good day.
>
>Becky
>
>
>>GetDriveType will do this.
>>
>>Declare Integer GetDriveType in Win32API String
>>
>>?GetDriveType("a:\") = 2
>>?GetDriveType("c:\") = 3
>>?GetDriveType("d:\") = 5 (CD ROM)
>>
>>>VFP 3.0
>>>
>>>Hello All,
>>>
>>>I need to have my program find the cdrom drive on the installation
>>>machine and use that path to go between my program on the cdrom
>>>and the hard drive.
>>>
>>>Is there an api function that will accomplish this task?
>>>
>>>Thanks,
>>>
>>>Becky
--sb--