Backup and Restore Device Drivers in Windows 10  

Page 1 of 12 12311 ... LastLast
    Backup and Restore Device Drivers in Windows 10

    Backup and Restore Device Drivers in Windows 10

    How to Backup and Restore Device Drivers in Windows 10
    Published by Category: Hardware & Drivers
    01 Sep 2022
    Designer Media Ltd

    How to Backup and Restore Device Drivers in Windows 10


    If you clean install Windows, you will need to install drivers for each device in the system. Some of these device drivers may no longer be available from the manufacturer, or you misplaced a backup of the driver installation file from the manufacturer.

    It would be a good idea to back up your device drivers before doing a clean install to make it easy to restore any of these drivers as needed afterwards.

    This tutorial will show you how to back up and restore all 3rd party device drivers on your Windows 10 PC.

    You must be signed in as an administrator to be able to backup and restore drivers.


    For a Windows 11 version of this tutorial, see:

    Backup and Restore Device Drivers in Windows 11



    Contents

    • Option One: Back Up All Device Drivers in Command Prompt
    • Option Two: Back Up All Device Drivers in PowerShell
    • Option Three: Restore a Device Driver Backup in Device Manager
    • Option Four: Restore All Device Drivers in Command Prompt
    • Option Five: Back Up and Restore All Device Drivers using a BAT file






    OPTION ONE

    Back Up All Device Drivers in Command Prompt


    For more usage details about the dism /export-driver command, see: DISM Driver Servicing (.inf) Command-Line Options - Microsoft Hardware Dev Center

    For more usage details about the PnPUtil command, see: PnPUtil Command Syntax - Microsoft Hardware Dev Center


    1 Open an elevated command prompt.

    2 Type either command below you want to use into the elevated command prompt, and press Enter. (see screenshot below)

    dism /online /export-driver /destination:"full path of folder"

    OR

    pnputil /export-driver * "full path of folder"

    Substitute full path of folder in the command above with the actual full path of the already existing folder (ex: "F:\Drivers Backup") you want to export all 3rd party device drivers into. If this folder doesn't currently exist, you will need to create it first before running the command.

    For example: dism /online /export-driver /destination:"F:\Drivers Backup"

    Backup and Restore Device Drivers in Windows 10-backup_drivers_command.png

    3 When exporting has finished, you can close the elevated command prompt if you like.

    4 The device drivers will now be exported into the specified folder location (ex: "F:\Drivers Backup") as your backup. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-drivers_backup.png






    OPTION TWO

    Back Up All Device Drivers in PowerShell


    For more usage details about the Export-WindowsDriver command, see: Export-WindowsDriver - Microsoft Windows IT Pro Center


    1 Open an elevated PowerShell.

    2 Enter the command below into the elevated PowerShell, and press Enter. (see screenshots below)

    Export-WindowsDriver -Online -Destination "full path of folder"

    Substitute full path of folder in the command above with the actual full path of the already existing folder (ex: "F:\Drivers Backup") you want to export all 3rd party device drivers into. If this folder doesn't currently exist, you will need to create it first before running the command.

    For example: Export-WindowsDriver -Online -Destination "F:\Drivers Backup"

    Backup and Restore Device Drivers in Windows 10-backup_drivers_powershell.png

    3 When exporting has finished, you can close the elevated PowerShell if you like.

    4 The device drivers will now be exported into the specified folder location (ex: "F:\Drivers Backup") as your backup. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-drivers_backup.png






    OPTION THREE

    Restore a Device Driver Backup in Device Manager


    1 Open Device Manager.

    2 Right click or press and hold on the device (ex: "Intel(R) RealSense(TM) 3D Camera (Front F200) Depth") you want to restore a driver backup for, and click/tap on Update driver. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-restore_drivers-1.jpg

    3 Click/tap on Manually install a driver. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-restore_drivers-2.png

    4 Follow the steps below to select the folder (ex: "F:\Drivers Backup") containing the backup of your device drivers from Option One or Option Two above. (see screenshots below)

    1) Click/tap on the Browse button.

    2) Navigate to and select the folder (ex: "F:\Drivers Backup") containing the backup of device drivers.

    3) Click/tap on OK.

    4) Check the Include subfolders box.

    5) Click/tap on Next.

    Backup and Restore Device Drivers in Windows 10-restore_drivers-3.png

    5 Device Manager will now search for and install the device driver if it's newer than what is currently installed. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-restore_drivers-4.png

    6 When you have finished restoring driver backups, you can close Device Manager if you like.






    OPTION FOUR

    Restore All Device Drivers in Command Prompt


    For more usage details about the PnPUtil command, see: PnPUtil Command Syntax - Microsoft Hardware Dev Center


    1 Open an elevated command prompt.

    2 Type the command below you want to use into the elevated command prompt, and press Enter. (see screenshots below)

    pnputil /add-driver "full path of folder\*.inf" /subdirs /install /reboot

    Substitute full path of folder in the command above with the actual full path of the folder (ex: "E:\Drivers Backup") you exported all 3rd party device drivers into.

    For example: pnputil /add-driver "E:\Drivers Backup\*.inf" /subdirs /install /reboot


    The /reboot option in the command will automatically restart the computer if needed to complete the operation of importing the drivers.

    Be sure you save and close anything open before running this command.

    3 When importing has finished, you can close the elevated command prompt if you like.

    Backup and Restore Device Drivers in Windows 10-pnputil-1.png Backup and Restore Device Drivers in Windows 10-pnputil-2.png






    OPTION FIVE

    Back Up and Restore All Device Drivers using a BAT file


    Special thank you to our member Matthew for providing this option.


    1 Click/tap on the Download button below to download the BAT file below.

    Backup_or_Restore_Device_Drivers.bat

    Download

    2 Save the .bat file to your desktop.

    3 Unblock and run the downloaded .bat file.

    4 If prompted by (UAC), click/tap on Yes to approve.

    5 Press the number 1, 2, or 3 for what you want to do. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-backup_1.jpg

    6 Navigate to and select where you want to save to, or select a backup file to restore. (see screenshot below)

    Backup and Restore Device Drivers in Windows 10-backup_2.jpg


    That's it,
    Shawn






  1. Posts : 35
    Win10 Pro 64 v 20H2 build 19042.572
       #1

    Thanks Brink just what i needed
      My Computer


  2. Posts : 68,652
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

      My Computers


  3. Posts : 22
    Win 10 Pro
       #3

    Hmmmm. I'm sure it's that I'm exhausted from this stupid bdos which leaves no trace, but I do feel a bit as though i was getting advice from a used car salesman note that I've read the fine print here. May I suggest/request that the words "3rd party" appear EVERY TIME the word "driver" appears in this article.i thought I was learning about a easy to get a full complete set of drivers that are known to be enough to install Windows in most cases. But actually in my case (because I only have virtualbox here), I'm getting a grand total of about 8 drivers, none of which are even vaguely related to actual physical hardware. As just one example, look at the "Contents" and you'll see why I brought thought I was getting All Drivers.

    Thanks
      My Computer


  4. Posts : 4,173
    Windows 11 Pro, 22H2
       #4

    @Brink,

    I love this tutorial. I use it regularly. However, I just wanted to share one more method of installing the exported drivers. I noticed that the tutorial describes how to install a single driver using Device Manager but includes no way to install ALL exported drivers at once. This can be useful in a scenario like this:

    When a major Windows update is released, I like to perform a completely clean install of Windows. After I perform the install, I run a simple command to restore ALL of my drivers that I have previously backed up using the steps in this tutorial. So with one command, I have every single driver needed reinstalled.

    Here is how (Note: There are other methods as well, this is just my preferred method):

    Open an elevated command prompt and change directories to the folder where you exported your drivers. Run this command:

    pnputil /add-driver *.inf /subdirs /install /reboot

    Note that the "/reboot" is optional. If needed, this will cause the system to reboot to finish installing drivers requiring a reboot.
      My Computers


  5. Posts : 68,652
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #5

    hsehestedt said:
    @Brink,

    I love this tutorial. I use it regularly. However, I just wanted to share one more method of installing the exported drivers. I noticed that the tutorial describes how to install a single driver using Device Manager but includes no way to install ALL exported drivers at once. This can be useful in a scenario like this:

    When a major Windows update is released, I like to perform a completely clean install of Windows. After I perform the install, I run a simple command to restore ALL of my drivers that I have previously backed up using the steps in this tutorial. So with one command, I have every single driver needed reinstalled.

    Here is how (Note: There are other methods as well, this is just my preferred method):

    Open an elevated command prompt and change directories to the folder where you exported your drivers. Run this command:

    pnputil /add-driver *.inf /subdirs /install /reboot

    Note that the "/reboot" is optional. If needed, this will cause the system to reboot to finish installing drivers requiring a reboot.
    Hello Hannes,

    Good idea. It has now been added as option 4. Thank you.
      My Computers


  6. Posts : 4,173
    Windows 11 Pro, 22H2
       #6

    Wow! Excellent. Thanks.
      My Computers


  7. Posts : 145
    Windows 10 Home
       #7

    My system made a folder named "Drivers" in the C:\ root directory.
    Why is this folder here ? The files have different extensions other than just .INF which is all that the DriverStore contains.

    Can I create a backup of this folder with the Power Shell (Option Two) method ? Or maybe it isn't really necessary to backup this folder
    The DISM method will only work to make a backup of .INF drivers

    The screen shot shows the path of the files:
    Backup and Restore Device Drivers in Windows 10-driver-files-root-directory-folder.jpg
      My Computer


  8. Posts : 68,652
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #8

    Hello @Jaguwaar20,

    Did you run anything to cause this Drivers folder to be created there? Usually there's a "C:\Windows\System32\drivers" folder for the installed drivers instead.

    You would want to use the exact steps in the tutorial instead though.
      My Computers


  9. Posts : 145
    Windows 10 Home
       #9

    Brink said:
    Hello @Jaguwaar20,

    Did you run anything to cause this Drivers folder to be created there? Usually there's a "C:\Windows\System32\drivers" folder for the installed drivers instead.


    You would want to use the exact steps in the tutorial instead though.
    No. I haven't created a backup of the Driver Store yet or ever, for that matter. I was only reading your tutorial, not actually performing any backup. So I just really haven't paid attention that closely in File Explorer to even notice it. It's been there for quite a while if the date/time stamp is true.

    - - - Updated - - -

    I think I should look further in the Driver store (I have Rapr.exe from GitHub)... just to compare what files match up there with the files located in this "C:\Drivers" folder

    - - - Updated - - -

    Ok. It's a Dell PC. This is pretty common with this manufacturer to create a default folder called C:\Drivers. When driver installation packages are extracted, they're unpacked here.
    These drivers stored elsewhere may come in handy. I just have to try a few commands maybe just using MS-DOS xcopy or robocopy and store them on USB/DVD. There probably isn't a way to know for certain if its just a temporary folder, or if the folder/files actually becomes used, but I'm going to run diskcleanup tool to see if it will delete many of these files.
      My Computer


 

Tutorial Categories

Backup and Restore Device Drivers in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:11.
Find Us




Windows 10 Forums