Run program on USB disconnect

Forum regarding Windows Software and Home Automation Domotica.
Post Reply
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

Run program on USB disconnect

Post by Lennart »

Hi all,

I was wondering: does anybody know of a (Vista compatible) utility that allows you to specify a program to run on DISconnection of a USB device? My touchscreen drivers are a bit flaky and this sometimes leads to a disconnect. I would like to be able to detect this event and run a program whenever it happens.

Thanks!

Lennart
Edwin2008
Advanced Member
Advanced Member
Posts: 721
Joined: Fri Nov 28, 2008 4:14 pm
Location: Netherlands

Run program on USB disconnect

Post by Edwin2008 »

you could look at
http://quick.mixnmojo.com/usb-disk-ejector
and if you want the usb device to keep it's drive letter
http://www.uwe-sieber.de/usbdlm_e.html
and if you would like to autmate some thing then here is a suggestion
http://forums.cnet.com/5208-6122_102-0. ... dID=273629

oeps, misundrstand the post. well anyway perhaps it is for another moment :)
Lennart
Member
Member
Posts: 497
Joined: Sat Jul 22, 2006 10:58 am
Location: Netherlands

Run program on USB disconnect

Post by Lennart »

Thanks Edwin; that's indeed not the solution to my problem :-). I've solved it for the moment by checking every two minutes whether the touchscreen driver is still running. It works, though it's not a very satisfactory solution.

Lennart
dutchnomad
Member
Member
Posts: 52
Joined: Fri Oct 24, 2008 9:03 am
Location: Netherlands

Run program on USB disconnect

Post by dutchnomad »

Dit lijkt me wel een oplossing:

http://www.codeproject.com/KB/system/DriveDetector.aspx

Dutchnomad
Lempens
Member
Member
Posts: 265
Joined: Wed Dec 12, 2007 1:24 am
Location: Netherlands

Run program on USB disconnect

Post by Lempens »

Or you can use the Microsoft program DevCon. Put the program in a scheduler, and let it reconnect the USB device every 30 minutes.

http://support.microsoft.com/kb/311272

"c:\devcon.exe disable @usb\ *vid_10c4*"
Where you have to change vid_10c4 to your usb device.

to enable the device use "c:\devcon.exe enable @usb\ *vid_10c4*"

I use this when my PMIX35 from Xanura hangs. A couple of times a week the PMIX35 hangs. When my program detects it, it run above command's.
Post Reply

Return to “Windows Forum”