Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
December 5, 2002
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.
You May Also Like