Windows XP Community - XPHeads



Spyware Doctor

Can I get a program to run when a particular USB device is connected?

microsoft.public.windowsxp.configuration_manage


Reply
  #1 (permalink)  
Old 03-04-2008, 11:34 PM
Mark F
 
Posts: n/a
Can I get a program to run when a particular USB device is connected?
Can I get a program to run when a particular USB device is connected?

I am not a Windows driver programmer, so what I need is a generic
way to have Windows XP call my program when a particular device is
connected.

I suppose that there are at least two cases:
1. the driver is unique to the device
2. the driver is something used by many devices,
such as WINDOWS\system32\DRIVERS\disk.sys

My idea is that if someone inserts a USB device of the type
that I am tracking I would be able to log the event or send
an email or whatever.

Hmmm - sounds almost like a key logger, but:
a) it isn't,
b) the machine is mine anyhow,
and
c) if I wanted a keylogger there are probably about 5
that I could use.

It is OK if the solution involves taking an open source
keylogger and modifying it to do what I want, but the device
that I am interested in shows up as a mouse, not a key board.)

For now, however, the device that I am interested in shows up in
Device Manager under
"Human Interface Devices" -> "USB Human Interface Device"
and under
"Mice and other pointing devices" -> "HID-compliant mouse"

At least one of the driver routines is CURRENTLY only used
on my system by the device that I am interested in. I'd be
happy to have a solution that works for this case and worry
about what happens if I change my real mouse to one that
uses the same generic driver later.

I don't have to do anything to the device and timing
is not critical, so it might be possible for me to
have a "stub" routine which flips a bit and then goes
to the startup routine for the real driver. (I.e., I am
in case 2, but I can assume it is case 1.)

(I last played with driver routines around 1990, so
I have no idea how Windows XP does things. I'm just assuming
that Windows XP can do what (IBM) MFT, (DEC)
VMS and DEC's flavor of Unix each could do from 1967 to about
1990.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:08 PM.


Registry Mechanic - Free Scan Now
Driver Scanner 2009 - Free Scan Now




Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74