slettebo Posted June 15, 2004 Share 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. Link to comment Share on other sites More sharing options...
Strat79 Posted June 15, 2004 Share 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? Link to comment Share on other sites More sharing options...
Aaron Posted June 15, 2004 Share 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). Link to comment Share on other sites More sharing options...
Strat79 Posted June 15, 2004 Share Posted June 15, 2004 Cool, thanks Aaron. I didn't know that myself. Learn something new everyday. Link to comment Share on other sites More sharing options...
slettebo Posted June 15, 2004 Author Share Posted June 15, 2004 Thank's Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now