Hi.

--- In [email protected], "prema_arnava" <[EMAIL PROTECTED]> wrote:
> Is there another way? Because I want to fire some script after any
> drive was plugged in, not only my own.

You could use the dll-plugin to monitor the WM_DEVICECHANGE-message(s):

Something like that:

local WM_DEVICECHANGE = 0x0219
dll.monitored_msg(WM_DEVICECHANGE, ?`win.debug("device changed!")`)

Also see here:
http://msdn2.microsoft.com/en-us/library/aa363480.aspx

It should be possible to determine DBT_DEVICEARRIVAL, also drive-type,
etc.

Mockey


Reply via email to