Jump to content

Discover CDRW/DVD drive in batch


Recommended Posts

Does anyone have, or know a little tool that can

be used in a batch file to detect if a drive is

a DVD-ROM or a CD-Writer? :)

If that is possible, I can automaticaly install

nero if a CDRW is found and install PowerDVD

if a DVD drive is found.

Thnzzz

The Bee

Link to comment
Share on other sites


No, CDROM is just an environment variable you created with IF EXIST, it can be named anything really.

You could have it like this if you wanted to: IF EXIST D:\CDPath.txt set SOMEOTHERNAME=D:

and the environment variable pointing to where it located the file "CDpath.txt" will be called %SOMEOTHERNAME% 

--------------------

Link to comment
Share on other sites

try http://support.microsoft.com/default.aspx?...b;EN-US;Q311272devcon, a tool from microsoft. Its a command line tool equivalent to the device manager.

You could try to found a string like "rw" like this:

devcon find *rw*

On my system it returns me:

E:\Mes Documents>devcon find *rw*
IDE\CDROMMATs***A_CDRW/DVD_UJDA740_______________1.03____\5&3367BC97&0&0.0.0: MATs***A CDRW/DVD UJDA740
1 matching device(s) found.

E:\Mes Documents>

Link to comment
Share on other sites

You could probably query setupapi.log, or query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\Enum\0 or 1 for the sring. You could also look in the registry to see if it has a recording tab.

-gosh

Link to comment
Share on other sites

  • 3 weeks later...

Sirs,

The link http://support.microsoft.com/default.aspx?...b;EN-US;Q305184 could be usefull.

You will need a DDK compiler to change the code but it is pretty easy!

The DEVCON is name dependant and I already found some units that a couldn´t identify. The ENUMCD worked fine for each DVD-ROM, CD-ROM, CD-RW, COMBO or DVD-RW that I already tested.

Best Regards

O. Villa

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...