views:

44

answers:

1

I'm creating setup for my application in Inno Setup, and I will probably need to install driver sometime in the future. However, I need to know some tips about installing drivers in Inno Setup now, so I can easily add the driver into the setup when it's needed.


  1. Should I force the user to install program only into C:\Program Files\<app>\, or it doesn't matter and I should let him install it even on network drive?

  2. Should I install the driver in C:\Windows\, to make it available anytime (even without network drive), or it doesn't matter as well?

  3. Is it possible to start driver on-demand? I want to release new versions of my program, and I need to create the setup so it doesn't require reboot after updating my app. So is it possible to shutdown the driver, overwrite it with new version, and turn on again (as you can with services) without restarting Windows?

  4. Is it possible to overwrite the driver so easily (as mentioned in question 3), or is it recommended to always fully uninstall the program, and then again install the new version?

  5. Could you please include some additional tips about installing/uninstalling/updating drivers you find important? I'm sure I've missed some important points.


I don't have much driver-experience nor knowledge, so I apologize for somewhat confused questions.

And it is probably important what kind of driver would it be, so there is a related question, which should answer that: http://stackoverflow.com/questions/3223406/low-level-mouse-hook-and-directx

+1  A: 

Please don't do this, installing an upper-level filter driver on all HID devices is an extraordinarily bad idea. That being said, I'll answer your questions anyways.

  1. When you install a driver, Windows manages where the driver itself gets put (in DriverStore), you don't worry about this.

  2. See #1

  3. For some drivers, yes. For a filter driver above HID, no. You'd have to force remove all mice and keyboards on their system and re-add them (which isn't possible with PS/2 devices).

  4. Yes, it's fairly easy to update a driver given that you correctly version it and require a reboot.

Once again, while I don't want to be discouraging, you're only going to get yourself in a world of hurt via doing this.

Paul Betts
Thank you. However, what do you suggest? How should I accomplish the system-wide mouse-input filtering? LowLevelMouseHook apparently doesn't filter WPF applications. Is there some other way?
Paja
I would suggest not filtering mouse input. What's your scenario in general?
Paul Betts
I don't have to filter all the input, only certain clicks. The scenario is somewhat complex, it would take **many** lines to explain. I just need to filter some clicks, so maybe there is some nice workaround to make it work even with WPF without using some nasty custom driver. Maybe 1px window under the cursor which would catch all clicks, and I would decide whether to let the click through. But the application can't be done without click filtering.
Paja
I have the system-wide mouse filtering question [here](http://stackoverflow.com/questions/3223406/low-level-mouse-hook-and-directx), so if you have any ideas, please post them there, as I could give you the bounty.
Paja