Es obvio, pero se supone que modificarás el código con la letra de la unidad del cd/dvd que quieres comprobar.
Código Delphi
[-]if DiskInDrive('a') = False then
ShowMessage('Drive not ready');
if DiskInDrive('d') = False then
ShowMessage('Drive not ready');
if DiskInDrive('f') = False then
ShowMessage('Drive not ready');
if DiskInDrive('g') = False then
ShowMessage('Drive not ready');