obtaining the cd rom drive letter

i have a problem with the media player not being able to pick up my cd rom
drive letter (F) from my cd r drive (G).  i have a case statement below

case (DRIVE_CDROM) of
  10 : DriveLetter := 'J:';
  9 : DriveLetter := 'I:';
  8 : DriveLetter := 'H:';
  7 : DriveLetter := 'G:';
  6 : DriveLetter := 'F:';
  5 : DriveLetter := 'E:';
  4 : DriveLetter := 'D:';
 // cases 1 to 3 are reserved for drives A B C
 end; // case
 mpCDPlayer.FileName := DriveLetter;

but it keeps giving me the mci error