June 15, 200422 yr Is it possible to detect witch drive letter the DVD Drive uses..eg. The envirement variable for the system drive is %systemdrive%. Is there a variable for the DVD Drive or a great script that can find it.
June 15, 200422 yr There is %CDROM% which would include DVD drives also. Or do you have a CD rom and a DVD drive, and want to pick the DVD only? Like something that will differentiate between them?
June 15, 200422 yr You need to create an environment variable for the DVD drive. This command script works well for detecting your drive, based on what file is on the DVD disc itself:IF EXIST D:\somefile.txt set CDROM=D:IF EXIST E:\somefile.txt set CDROM=E:IF EXIST F:\somefile.txt set CDROM=F:IF EXIST G:\somefile.txt set CDROM=G:IF EXIST H:\somefile.txt set CDROM=H:IF EXIST I:\somefile.txt set CDROM=I:IF EXIST J:\somefile.txt set CDROM=J:"CDROM" can be changed to any variable you want, like "DVDROM" so that it becomes set as %DVDROM% instead (The environment variable only works in the current session. When the command prompt window is closed the %DVDROM% variable is gone).
Create an account or sign in to comment