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.
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 onnetwork drive
?Should I install the driver in
C:\Windows\
, to make it available anytime (even without network drive), or it doesn't matter as well?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?
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?
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 importan开发者_如何转开发t what kind of driver would it be, so there is a related question, which should answer that: Low level mouse hook and DirectX
Driver Development Resources
I've found some helpful links regarding driver development. Use this as a reference.
Driver Development at CodeProject - Part 1, Part 2, Part 3, Part 4, Part 5, Part 6
http://www.catch22.net/tuts/kernel1.asp Introduction to Device Drivers Windows Driver Development TutorialPlease 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.
When you install a driver, Windows manages where the driver itself gets put (in DriverStore), you don't worry about this.
See #1
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).
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.
精彩评论