Do something when usb stick is removed

Hi,

I would like to be able to start an applescript that is initiated by removing (not unmounting) a USB stick. Normally you get a warning telling the user that it is unsafe to do this. But for a specific USB stick I want the warning to not appear (or at least to be closed automatically) and to start a script. I’ve tried it with the DoSomethingWhen prefpane, but it only works when unmounting a drive, not when it is physically removed.

Any suggestions?

Hi,

I don’t know how to dismiss the dialog,
but you can either attach a folder action (remove items) to the folder /Volumes
or you use launchd to do this, which is described in this article by Craig Smith