Drive:Activated logo
Content sign

Removing PnP drivers from Vista's driver store

   Filed under: ,    
I moved my digital TV card from my HTPC to my desktop recently after my HTPC died again Angry. The card was detected and working fine in XP. Booting into Vista RC1 however, the driver installation was a mess because Vista first tried to install drivers from Windows Update but some how that went sour. The device drivers weren't installed properly and it didn't work. Rebooting Vista brought up the detected new hardware dialog again, so this time I tried the drivers from the card's website. These didn't install properly either, with Vista telling me that 'the system could not find the file specified'. Wow, how helpful. Attempting to update the driver didn't help - same issue, so I went digging.

It turned out that as soon as you use a driver, it gets stored into Vista's driver store. This store is protected so you can't go fiddling in it, even though its visible at c:\windows\system32\driverstore. I hate it when it shows me something but I can't edit it Angry - opening Explorer.exe as Administrator didn't help. What I needed to do was remove the driver from the store so it would copy it again from where I downloaded the driver to (Yes, even if you specify update driver, if it thinks its the same as the one in the store, it will use the stored one).

I think I went the long way to solve this issue. The short way is to simply uninstall all the devices in Device Manager that relate to that physical device (e.g. the Tuner and crossbar devices for TV cards), and the driver should be removed from the driver store. In case that doesn't work however, I'll document the method I used below.
  1. Open up c:\windows\inf\setupapi.dev.log in Notepad. This file is very useful as it logs everything that Windows does during the driver installation and tells you more specifically what the problem was if it fails. By default, Windows doesn't show absolutely everything, but you can change that using the instructions here.
  2. All driver installations are logged here, so scroll down to the bottom of the file for the latest driver installation. Every time a driver installation is initiated, the following line is first written:
    >>> [Device Install ... followed by where the driver comes from and the device ID.
  3. Find the line in this section that starts with !!!. This is where the error information is. I encountered the following error. If yours is different, this may not solve your problem, but there should be no harm in trying.
    !!!  ndv:      Driver Package import failed for new device...installing NULL driver.
  4. If its there, find the following line in the section (where # can be any number) and make note of that path:
         inf:           Published Inf Path: C:\Windows\INF\oem#.inf
  5. Go into your c:\windows\inf folder and see if you can find that inf file. If it doesn't exist, find a line in setupapi.dev.log in the section you located before that starts with:
         inf:           Driver Store location: C:\windows\system32\driverstore\filerepository\(inf file name and random string)\(inf file name).
    Make note of that path, find that file and copy it into C:\windows\inf. Rename it to oem#.inf where the # is the number you found in step 4.
  6. Go to Start -> All Programs -> Accessories, right-click on the Command Prompt and select Run as Administrator.
  7. Type in pnputil -d oem#.inf and press ENTER, replacing # with the number from step 4.
This should remove the problem driver from the driver store. Now try reinstalling the driver for the device.

This trick is useful for fixing issues if you try to install alternate drivers (e.g. unofficial drivers from another source) or drivers from Windows Update which do not install successfully. Its also good if you want to force Windows to use a certain version of a driver, instead of letting it pick for you.

When actually updating drivers (i.e. newer versions of the driver) though there shouldn't be an issue - assuming that the driver writer updated the version number Windows should realise that its newer and use it instead.
Trackbacks sign
1 Trackback
Trackback URL

Pingback from  Vista issue woes… solved!

Comments sign
12 Comments
Comments RSS RSS icon
Comment sign
Dr Kedar Hibare said:

Hi I am Dr Kedar from India. I recently purcased a Windows Vista based Lap top and also a external hard drive of 120 GB. When ever I plug in the external hard disc it does not show up on my computer.but the device manager lists it.....It gives me an error message that the "Pnp driver" is missing!!! Have no idea how to go about this problem..... I have a lot of important data to back up from my lap top and so I picked up the exteral hard drive....This external drive works pefectly well with Windows XP desktop at my residence but throws up problems with the lap top..How do I get past this...please help

Thanx in advance

Regards

Kedar

U can write back to me at:

kedarhibare@gmail.com

Comment sign
Bryan said:

For the removal of anything that gives me a hard time, I just use Unlocker.  It's free and really easy to use.  This may save you some steps.  Unlocker, and instructions on how to use it can be found here:

ccollomb.free.fr/unlocker

Give it a shot... you may have to reboot to get it to delete the files, but I haven't had one yet that I haven't been able to get rid of with this.

Comment sign
Mike M said:

The error I have is device driver Timed out.  Would this method fix this issue?

Comment sign
Sam said:

Mike M:

Any more information? Do you know what device it is? Maybe Device Manager (Start -> right-click on Computer, click Manage, then click Device Manager) can shed some light.

If you look in the properties of the device, you should get more specific info on what the error is.

Comment sign
trunksy said:

You rock. I wasn't able to figure out my OEM number but there's also a checkmark when you uninstall the device that you can also uninstall the software too. That worked better but the info was still good to know because when I went back into the setupapi.dev.log file, it showed me that my OEM number was 1 and that it was removed properly. Ahhhh, peace of mind!

Comment sign
cabl1953@hotmail.com said:

PnPDriverInstallError...REMOVER

Comment sign
Dave said:

Sam,

Thanks so much for posting the info on Removing PnP drivers from Vista.  Any chance you could share the info you refer to at the link HERE?

"By default, Windows doesn't show absolutely everything, but you can change that using the instructions HERE."

That link no longer works.

Dave Hewitt

david.hewitt@charter.net

Thanks

Comment sign
Sam said:

Dave:

Here's the new link -

msdn.microsoft.com/.../ms791334.aspx

I've updated the page as well.

Comment sign
Dave said:

Thanks! I was able to successfully identify & remove a problematic Epson printer driver with the information you so kindly posted explaining how to interpret the setupapi.dev.log  I could not find that information anywhere else on the net...

Dave Hewitt

Madison, WI

Comment sign
phaneswar said:

Thanks. Its really helped me in removed the printer driver manually. Can we remove it programatically.

Comment sign
Colin Allinson said:

This seems very useful but I cannot quite relate it to my log. I am trying to remove a Cypress HX2LP Kit USB Hub driver and go back to the generic hub driver.

Comment sign
Dominic Clifton said:

thanks for posting this, i found it most helpful!

Post comment sign
Leave a Comment
I know you want to!
(required)  
(optional)
(required)  

Want to keep stay in the loop with the comments here? Leave your email address below and you'll be informed when a new comment is added to this blog post.

(optional):  

Submit