Sign in to follow this  
Followers 0
zorphnog

CDTray in WinPE

2 posts in this topic

I am trying to get CDTray to work in a WinPE 2.0 environment to no avail. I've tried running it through Dependency Walker to see what dll's are missing or where the break point is, but the AutoIt developers have prevented that functionality. So this may be more of a developer question. What are the dependencies of the CDTray function?

Share this post


Link to post
Share on other sites



For anyone that might be interested, I found that this will usually work in a WinPE environment:

$aDrives = DriveGetDrive("all")
If Not @error Then
    For $i = 1 To $aDrives[0]
        If DriveGetType($aDrives[$i] & "\") = "CDROM" Then
            $sDrive = StringUpper($aDrives[$i]) & "\"
            ExitLoop
        EndIf
    Next
EndIf

$oShell = ObjCreate("Shell.Application")
$oShell.Namespace(17).ParseName($sDrive).InvokeVerb("Eject")

$iTimer = TimerInit()
While DriveStatus($sDrive) <> "NOTREADY" And TimerDiff($iTimer) < 10000
    Sleep(10)
WEnd

Share this post


Link to post
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
Sign in to follow this  
Followers 0