Jump to content

Recommended Posts

Posted (edited)

hi !

is there a way to detect this event :(i.e: pen drive introducing) ? both win 2000 and xp

thiks

Maybe:

$var = DriveGetDrive("REMOVABLE")

While 1
    Select
        Case Not $var[0] = DriveGetDrive("REMOVABLE")
            MsgBox(0, "Drive", "A removeable drive was inserted.")
        Case Else
            
    EndSelect
WEnd

Edit: Woah! What im i on... Edited code. UNTESTED!!

Edited by bert
Posted

thinks ! i'll try this function.

maybe there is other way (registry event, process lanch, or other plugins events)

Posted

I played a bit with GUIRegisterMsg and some message I can't remember the name of at the moment...maybe WM_DEVICECHANGE.

It worked for me, but I'm pretty certain it also fires on other events as well, so try googling it a bit and I'm sure you'll find something

interesting concerning pen-drives.

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...