Tech Recounts

February 4, 2009

“Failed to uninstall the device”

Filed under: Uncategorized — Jacky @ 11:30 am

In my previous post I mentioned about the WUSB54G adapter giving a BSoD and the newer 2.1.0.0 version was needed.

But when I plugged the adapter in most of the time I would encounter a BSoD shortly after, and that means I couldn’t update the driver.

I decided to use Safe Mode to update the driver.

When I went into Safe Mode I see the device listed in Device Manager, but it’s shown as “Linksys Wireless-G USB Network Adapter #2“. I didn’t want the “#2” there (I’m a perfectionist) and this adapter has messed up my brand new installation. I decided to just totally remove all its traces so that Windows can re-detect it and install the drivers.

By using DEVMGR_SHOW_NONPRESENT_DEVICES, I managed to unhide all devices, even if they are not present.

I then tried to uninstall all entries with “Linksys” in it.

All entries gave me the error “Failed to uninstall the device. The device may be required to boot up the computer.“.

I had dealt with this error before, and I know the way to remove the device is to remove its traces in the registry.

I didn’t want to do any disastrous changes to my new installation, so I imaged the installation using the boot disc of Acronis True Image Home 2009, restore the image to another partition using the same program, add an entry to the boot.ini and I can safely play with a duplicated installation.

I did a Google search on the error and it came up with many results. It didn’t take me much time to find the solutions since I have dealt with it before, but it does take time to come up with an unified solution.

Rather than letting my solution go to waste I will post it on this blog so that anyone suffering from this problem can find a lifesaver hopefully.

My solution is based on how I deal with the Linksys Wireless-G USB Network Adapter WUSB54G and on Windows XP.

  1. Make sure the device is unplugged from the computer.
  2. Boot into Windows. Whether you choose the normal bootup or Safe Mode is up to you. Both works.
  3. Open up Command Prompt.
  4. Enter “SET DEVMGR_SHOW_NONPRESENT_DEVICES=1“.
  5. Now enter “devmgmt.msc” to access Device Manager. Leave the Command Prompt window open.
  6. Go to View > Show hidden devices.
  7. For my WUSB54G it belongs to the “Network adapters” category. Expand it.
  8. You see some of the entries are faded. Those are “ghosted” or non-present devices.For me the “Linksys Wireless-G USB Network Adapter – Packet Scheduler Miniport” entry is “ghosted” and “Linksys Wireless-G USB Network Adapter #2” and “Linksys Wireless-G USB Network Adapter #2 – Packet Scheduler Miniport” are non-present devices (not plugged in).
  9. Open up Registry Editor by going to Start > Run then enter “regedit“. Alternatively you can also type “regedit” in the Command Prompt window that you have left open.
  10. I am dealing with the “Network adapters” category so I go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}. You will see that on the right panel “Network adapters” is mentioned.
  11. The keys are in numbers but on the right panel the device name will be mentioned.The 3 devices that I have mentioned belongs to 0010, 0011 and 0012 respectively. How do I know? Check the right panel of the Registry Editor.
  12. I then proceed on to delete the keys 0010, 0011 and 0012.
  13. You will see that you are now able to uninstall the device in Device Manager. Go back to Device Manager and uninstall the devices.
  14. Most important step! Delete the driver file in question. Mine was the rt2500usb.sys which was located in C:\WINDOWS\system32\drivers (by default).What happens if you don’t follow this step?I did all of the following except for deletion of the driver file. I restarted and plugged in my device, which is the WUSB54G. Upon login Windows immediately detected the device and with some unknown methods installed the device back using the same driver file (which gives me a BSoD when I first installed the device).What happened next? BSoD.
  15. Restart your computer.
  16. Plug in your device. Windows will detect it again. For me it assigned it the name “Linksys Wireless-G USB Network Adapter” instead of “Linksys Wireless-G USB Network Adapter #2”, which is what I want.
  17. Since the SYS driver file is deleted Windows will prompt for it. Simply point it to the location of the new version of the driver.

This problem is quite common if you do a Google search on the “Failed to uninstall the device” error, but most of the results normally do not tell you the steps for resolving it in one instance, and I had to gather solutions from multiple Google results, play around with the registry in my duplicated installation before coming up with an unified and workable solution.

2 Comments »

  1. It is a greate post forthe actual workable solution on stupid network erro on Windows. I would like to keep this step by step for my working enviroment reference. Thanks a lot.

    Comment by NetTim — September 13, 2009 @ 1:37 am | Reply

  2. Great solution, thank you for all your hard work, was getting frustrated on the Google search looking for the answer.

    Comment by Dewayne — February 19, 2010 @ 12:32 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.