none
Uninstall Driver Completely In Windows 7

    Question

  • Hi....

    I have installed Driver for my USB Device. I want to uninstall it  completely, from my Windows 7.

    I deleted all the driver files in system 32 folder (system32\ drivers too) but as soon as i plug in the usb cable the driver gets installed again.

    tried to remove the folder in C:\Windows\System32\DriverStore\FileRepository but needs a system account to remove a folder.

    What can i do to Remove the driver completely, so when i plug in the USB cable the driver does not get installed automatically by windows 7.

    By the way, i need to automate this so i have a batch file that removes the device from DEVICE MANGER with no problem but as soon as USB cable connected the driver gets installed. Of course, if we do a manual Uninstall and check the box for remove driver software, then when i connect the USB the driver does not get installed again.  So, need to know how to do this by batch file.

     

    Thank you in advance for your quick prompt

    Tuesday, February 08, 2011 8:00 PM

Answers

  • You can probably perform the same action by calling the appropriate SetupDi Api calls.

    The most recent version of the Devcon.exe utility from the Window Driver Kit (WDK), might also be able to do this. (see dp_delete).

    What you are asking to do is not typical. Typically, when you go though the effort to install a driver for a device, espically a USB device, you want Windows to persist the device and driver *somewhat*, so that the *next* time you install the device, you don't have to go through the same rigamorale over again.  See: devmgr_show_nonpresent_devices

     


    Keith Garner (KeithGa.com) - Deployment Consultant - http://deployment.XtremeConsulting.com
    Wednesday, February 09, 2011 8:31 AM

All replies

  • This should be placed int he Windows 7 forum not the MDT forum.  This should be helpful: http://social.answers.microsoft.com/Forums/en-US/w7hardware/thread/a12312a6-0683-4f20-aff6-1aaa808c3d88
    Z
    Tuesday, February 08, 2011 10:15 PM
  • Thanks for the reply.

    I will post it to the right place.

    the Link does not help since i must make it automate it by my batch file.

    But i think i have to go the long way by removing the all registry keys.....

     

    Thanks again...

    Tuesday, February 08, 2011 10:28 PM
  • You can probably perform the same action by calling the appropriate SetupDi Api calls.

    The most recent version of the Devcon.exe utility from the Window Driver Kit (WDK), might also be able to do this. (see dp_delete).

    What you are asking to do is not typical. Typically, when you go though the effort to install a driver for a device, espically a USB device, you want Windows to persist the device and driver *somewhat*, so that the *next* time you install the device, you don't have to go through the same rigamorale over again.  See: devmgr_show_nonpresent_devices

     


    Keith Garner (KeithGa.com) - Deployment Consultant - http://deployment.XtremeConsulting.com
    Wednesday, February 09, 2011 8:31 AM
  • Thanks Keith for the reply.

    Actually, i am using DEVCON in my Script but as soon as i remove it windows Re-install the driver.

    I need to remove all the keys from the registry for that driver. This a complex product with 3 different Drivers.

    I made a Package using "WISE Installer". Now to upgrade the drivers i need to remove them, since this is a major upgrade.

    I know it looks not "TYPICAL" but i need to find the limitations and find the way around it.....

    Right now, i am able to remove all the drivers without getting a "BLUE SCREEN". Next is how to make my package installer to work for the Full installation /Upgrade .... Still do not know If all fits together.....!!

    Wednesday, February 09, 2011 12:56 PM
  • By the way is there a command line using DEVCON to remove more than 1 device of the same driver. What i mean is let say in Device Manger you see duplicated device driver installed for the same device, so how we can automate removing more than 1 installed driver for the same device...

     

    Wednesday, February 09, 2011 2:54 PM