Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to automate a change of driver for a same peripheral, under Windows ? Typically to switch between two ones. (I'm talking about the kind of driver which doesn't require the computer to reboot, typically).

I have a peripheral for which I use the constructor's driver in some cases, but also a modified driver in other cases. Not that the changing driver is really annoying, but I would like to know if it would be possible to make it easier, like for example in a shortcut. I know the name of the driver, even which files involved.

For more details, the concerned peripheral is a "Xbox360 Gamepad for Windows" (or something like this). The base driver is good for new games, but it doesn't handle correctly older ones (some issues with axes, and vibrations). The modified driver makes it behave like a classic controller, but then it doesn't work correctly on new games (typically using the new version of dxinput linked to the "Games for Windows"). However, this is not a question specific to this gamepad, I'm asking in general about automating this change of drivers.

I currently use Windows XP, so my question is mostly about it, but I'm also interested in the same issue for later versions (Windows 7, most likely).

I'm not really sure if this is even possible, but in case someone has an idea, I'm asking.


Edit: Since asking this question I haven't really been in condition to give it time again, for example to try what harrymc proposed (and now quack). So I apologize for the lack of feedback so far, but I will correct that, some later day.

share|improve this question
add comment

3 Answers

See the Driver Loader utility at http://www.osronline.com/article.cfm?article=157.
This might solve your problem.

share|improve this answer
    
Thanks, I'll give it a try. –  Gnoupi Aug 30 '09 at 8:01
    
If you liked my answer, how about an up vote? –  harrymc Aug 30 '09 at 13:54
    
aww, stuck for votes? here's a +1 for a good find :) –  Molly7244 Aug 30 '09 at 16:19
    
Many thanks for your kind attention, Molly. –  harrymc Aug 30 '09 at 17:29
add comment

Interesting question. This isn't a full answer, unfortunately, since I've been out of Windows driver development for a few years. Hopefully it will help put you on the right track.

A quick search found this thread at OSRonline. It's old, but is fairly direct:

You can use device manager and disable the device to unload, and enable to reload as has been stated by others here. BTW, the driver will only unload if every instance of the device is disabled.

Also, you can disable/enable programmatically. Look at the devcon sample in the latest DDK to see how that is done. In fact, the devcon sample is essentially a command line device manager with source, it has a wealth of useful information in it.

If you can find the devcon utility (seems available at that KB article; I'm not sure it's still available in the current Windows DDK) you may be able to whip up a batch script to disable your PnP devices and swap drivers. Such a script might need to load in a registry change to swap the drivers, but devcon should allow the script to perform the disable/enable.

share|improve this answer
add comment

the proper way would be another hardware profile but that's not really about 'cenvenience' :)

i'm using this method to experiment with different drivers or service configurations, but of course switching profiles requires restart.

share|improve this answer
    
Yes, so I guess such method would be nice in case of changing several drivers, for which rebooting is needed anyway. Unfortunately, it doesn't really match changing drivers for a single peripheral, as it would finally take more time. –  Gnoupi Aug 30 '09 at 6:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.