Most PCs with Win9x mount the CDROM as the last drive. Put a readable CD in the drive. You can test for content until you get to an error:
set %d=d:
if not exist e:\nul goto finish
set %d=e:
if not exist f:\nul goto finish
set %d=f:
if not exist g:\nul goto finish
. (continues in similar fashion, however many you want to check)
:
:finish
echo CDROM is drive %d