Jump to content

Detect cd/dvd drivers?


timoo91
 Share

Recommended Posts

Hello!

i'm working on script that automaticaly Ejects/Closes the cd/dvd-rom drivers in specific time

my code

#include <GUIConstants.au3>

$Form1 = GUICreate("TimooEject", 131, 96)
$drive_letter = GUICtrlCreateCombo("G:", 10, 15, 110, 25)
GUICtrlSetData(-1, "H:|I:")
$open = GUICtrlCreateButton("Open", 10, 40, 50, 20, 0)
$close = GUICtrlCreateButton("Close", 70, 40, 50, 20, 0)
$auto = GUICtrlCreateButton("Open/Close in 10 sec", 10, 65, 110, 20, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        
        Case $open
        CDTray(GUICtrlRead($drive_letter),"open")
        Case $close
        CDTray(GUICtrlRead($drive_letter),"close")
    Case $auto
        CDTray(GUICtrlRead($drive_letter),"open")
        Sleep(10000)
        CDTray(GUICtrlRead($drive_letter),"close")
    EndSwitch
WEnd

but the problem is i can't detect installed cd/dvd-rom driver(s) letter.

so how can i detect the installed cd/dvd-rom drivers details(letter,type etc...)?

Thanks!

Laptop:Toshiba A100CPU:1.73 Centrino DuoHDD:160 GBRAM:1GBGPU:GeForce Go 7600 256MBOS:Win XPMy scripts[list][*]Timoo Eject[/list]
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
 Share

  • Recently Browsing   0 members

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