*most* manufacturers of non-storage devices create an app that wait for WM_DEVICECHANGE notifications from the shell, and react to that in a hidden, top level window. Often they are started at startup using the RunOne registry key(boo!) or service(yaaa!), and sit in the system tray (Logitech Remotes for example...) and do nothing until they get that message in their message queue that their device has arrived.
for an example and more info on what the heck that is...
If you are building the device diver you can alter the INF to launch a specialised device coinstaller to do some things when the device driver is installed automatically, but I think it only launches the first time the device driver is inserted [for the first time]. If you unplug that device and plug it in again, no co-installer actions are executed. (I have to check on that, don't flog me if that isn't totally true.)