If you need to determine the drive letter of the computer's CD-ROM drive, download getcd.exe.
Oli Restorick wrote this utility to return the CD-ROM drive letter. Typing getcd.exe at a CMD prompt, return a display like D: or E:.
To use this a script:
for /f "Tokens=*" %%a in ('getcd.exe') do set CDROM=%%a
You could then use the %CDROM% variable in the remainder of the script.