5

I have been struggling getting some 3G USB modems and some other hardware to work and in the process I have managed to get a lot of unnecessary and just plain wrong drivers installed. This is causing my system and other hardware to work incorrectly. I would like to remove all the drivers on this system and have windows reinstall all the default drivers.

Can I do this with a Windows 7 repair install or how else can I get rid off all the current drivers.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
Jake
  • 669
  • 4
  • 9
  • 18

3 Answers3

5

Removing ALL drivers will damage windows and make your life horrible! Your are better off selectively removing the drivers.

Boot from Windows 7 DVD Select Repair and command prompt

If instead of a wim file your working with an offline copy of windows substitute the path that has the windows folder on it for c:\test\offline. When in the command prompt mode from the windows 7 DVD your drive letter may not be the same. Also with an offline copy of windows dism /Mount-Image maybe skipped.

This is all that is require on a offline version of windows.

Dism /Image:C:\ /Get-Drivers 

Lists all drivers

Dism /Image:C:\test\offline /Get-Drivers 

feed the list one at a time into the remove command below. It is only necessary to mount once, not once per driver.

You create an empty folder called test and within that another empty folder called offline. The wim file will be mounted to that folder.

Dism /Mount-Image /ImageFile:C:\test\images\install.wim /Name:"Windows 7 HomeBasic" /MountDir:C:\test\offline

Remove a specific driver from the image. Multiple drivers can be removed on one command line. For example, type:

Dism /Image:C:\test\offline /Remove-Driver /Driver:OEM1.inf /Driver:OEM2.inf

Removing a boot-critical driver package can make the offline Windows image unbootable

Adding drivers also has a command

Dism /Image:C:\test\offline /Add-Driver /Driver:C:\drivers\mydriver.inf /ForceUnsigned

Dism /Image:C:\test\offline /Add-Driver /Driver:c:\drivers /Recurse
cybernard
  • 13,380
  • 3
  • 29
  • 33
  • Where is `C:\test\offline` coming from? – Fake Name Mar 05 '19 at 05:05
  • @FakeName You create an empty folder called **test** and within that another empty folder called **offline**. The **wim** file will be mounted to that foler. See further edits I just made. – cybernard Mar 05 '19 at 12:50
5

You can use sysprep tool for that. Just run it from c:\windows\system32\sysprep\sysprep.exe, check Generalize and hit OK

Poma
  • 1,806
  • 6
  • 24
  • 31
  • 1
    While this answer could be correct, a much better answer would be if you could include how you would use `sysprep` to do that. – Scott Chamberlain Feb 09 '14 at 15:36
  • @ScottChamberlain just run it from `c:\windows\system32\sysprep\sysprep.exe`, check `Generalize` and hit OK – Poma Feb 09 '14 at 16:05
  • 2
    That would be good to put in your answer, not a comment. – Scott Chamberlain Feb 09 '14 at 16:22
  • @ScottChamberlain done – Poma Feb 10 '14 at 07:15
  • Shouldn't this only be run from a clean windows install? – Jacklynn Dec 09 '14 at 23:19
  • 1
    I'd downgrade this answer if I could, but I don't have enough reputation for it on this site. I tried to run sysprep since I've been having similar issues to the OP and it gave me a message saying that sysprep only works on a custom clean install of Windows. – Evan Lynch Jan 20 '15 at 05:13
  • This is a valid answer. The only caveat is that you would have to revert Windows to a degree. SysPrep is typically used for pushing a system image to multiple machines of similar design, while decreasing the amount of time required for individual setup on each computer. It's primarily used by organizations (many of which might be using group policy/permissions to control what is installed on their machines). –  Apr 16 '17 at 23:19
  • How do I run sysprep when I can't boot into windows, or even safe mode? – Shayan Apr 09 '19 at 06:42
1

I would recommend that you do a clean reinstall of Windows 7, that way you can wipe all of the old drivers, and Windows 7 will automatically reinstall the default drivers needed (for the most part).

Obviously, it is not possible to remove all of the drivers in an operating system, because it will break the OS permanently, thus a clean reinstall is pretty much the only way to go...

studiohack
  • 13,468
  • 19
  • 88
  • 118