Run program on USB disconnect

Forum regarding Windows Software and Home Automation Domotica.

Run program on USB disconnect

Postby Lennart » Thu Apr 23, 2009 10:45 am

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
Lennart
Member
Member
 
Posts: 497
Joined: July 2006
Location: Netherlands

Run program on USB disconnect

Postby Edwin2008 » Sat May 16, 2009 10:01 am

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 :)
Edwin2008
Advanced Member
Advanced Member
 
Posts: 696
Joined: November 2008
Location: Netherlands

Run program on USB disconnect

Postby Lennart » Sat May 16, 2009 11:23 am

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
Lennart
Member
Member
 
Posts: 497
Joined: July 2006
Location: Netherlands

Run program on USB disconnect

Postby dutchnomad » Sat May 16, 2009 11:47 am

Dit lijkt me wel een oplossing:

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

Dutchnomad
dutchnomad
Member
Member
 
Posts: 52
Joined: October 2008
Location: Netherlands

Run program on USB disconnect

Postby Lempens » Sat May 16, 2009 1:12 pm

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.
Lempens
Member
Member
 
Posts: 265
Joined: December 2007
Location: Netherlands


Return to Windows Forum

Who is online

Users browsing this forum: No registered users and 1 guest