Cosmo Cleaner Download free 1.2

Guide · Windows 11 and 10

How to back up all your drivers before reinstalling Windows

A folder of your working drivers saves you when Windows reinstalls without Wi-Fi or a storage driver. Two built-in commands make it in a minute.

Updated · 4 min read

Why back up drivers first

A clean install of Windows 11 or 10 usually finds drivers for most hardware through Windows Update. The exceptions are the ones that hurt: the Wi-Fi or Ethernet adapter, the storage controller, the touchpad on a laptop, or a specific audio or chipset driver. If the network driver is missing, you cannot download the rest. A folder of your working drivers, kept on a USB drive, turns a bad afternoon into a few minutes.

It is also the best safety step before removing old packages from the driver store.

What is included, and what is not

The backup also contains packages for hardware you no longer have, because the store keeps them. That is harmless, only larger.

Method 1: PnPUtil

  1. Create a folder on a drive that will not be erased, for example D:\DriverBackup. An external or USB drive is better.
  2. Right-click Start and choose Terminal (Admin).
  3. Run pnputil /export-driver * D:\DriverBackup.

PnPUtil prints each package as it exports it, and creates a subfolder for each one. The export command needs Windows 10 version 1607 or later. To see what you have before you export, run pnputil /enum-drivers.

Method 2: PowerShell or DISM

Microsoft's Export-WindowsDriver cmdlet does the same for all third-party drivers from the running system. In an administrator PowerShell window:

Export-WindowsDriver -Online -Destination D:\DriverBackup

The DISM command-line equivalent is dism /online /export-driver /destination:D:\DriverBackup. Either method gives a folder you can use in the same way.

Restore after you reinstall

  1. Install Windows and connect to the internet if you can. Let Windows Update install what it finds first.
  2. Copy the backup folder back to the PC.
  3. In an administrator terminal, run pnputil /add-driver "D:\DriverBackup\*.inf" /subdirs /install.

This adds every package to the driver store and installs it on matching devices. Microsoft notes that PnPUtil will not force a driver onto a device if it is not the highest-ranked match, so a newer driver that Windows Update has already installed is left alone, which is the right outcome.

To do it one device at a time, open Device Manager, right-click the device, choose Update driver, then Browse my computer for drivers, select the backup folder and keep Include subfolders ticked. Start with the network, then chipset and storage, then the rest.

Tips and pitfalls

In Cosmo Cleaner

Release 1.2.0 adds a Drivers tab with a Driver store view. Back up all drivers runs the PnPUtil export for you, as a job with progress, into Documents\Cosmo Cleaner driver backups\ followed by the date, or any folder you choose. Nothing leaves that folder, and Cosmo Cleaner never uploads it.

Restore from backup asks for a backup folder, creates a restore point first, then installs the packages it finds. Devices switch to a restored driver only when Windows ranks it better than the current one. Cosmo Cleaner asks for administrator rights for the steps that need them. You can also export an inventory of every driver as CSV or JSON, which is a handy list of what was installed on the old system.

Questions

Do I need to back up drivers before reinstalling Windows?

It is not required, because Windows Update finds most drivers. It is strongly worth doing for the network, storage and laptop-specific drivers that Windows may not find, especially if you cannot get online without them.

Does a driver backup include the graphics driver?

It includes the graphics driver package that is in the driver store. It does not include the vendor's control panel app, which you reinstall from the vendor if you want it.

Where does pnputil save the exported drivers?

In the folder you give it as the destination, with one subfolder per driver package. Choose a folder on a drive other than the one you are about to erase.

Is PnPUtil or DISM better for exporting drivers?

Both export the third-party drivers from the running Windows to a folder. PnPUtil is simpler and can export one package or all of them, while Export-WindowsDriver and DISM are convenient in scripts.

More Windows guides