slettebo Posted June 15, 2004 Posted June 15, 2004 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.
Strat79 Posted June 15, 2004 Posted June 15, 2004 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?
Aaron Posted June 15, 2004 Posted June 15, 2004 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).
Strat79 Posted June 15, 2004 Posted June 15, 2004 Cool, thanks Aaron. I didn't know that myself. Learn something new everyday.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now