How to export Windows drivers using DISM

Did you know that you can use the built-in tool DISM on Windows machines to export drivers?
Windows comes with a set of drivers to make sure that most hardware devices work out of the box. Manufacturers create drivers for their devices that users may install; these may add support for functionality or may be required to get a device working at all on a Windows PC.
If you plan to migrate to a new Windows PC or to set up the current one from scratch, you may be interested in having these custom installed drivers at hand to install them.
Tip: you may list all installed third-party Windows drivers using the free tool DriverView. Nir Sofer has another tool, InstalledDriversList, which you may use as well. There is also Driver Store Explorer that you may use.
How to export drivers using DISM
With DISM, it takes one command to export drivers on the current Windows system. Here is how that is done.
- Open Start.
- Type cmd.exe.
- Select Run as administrator.
- Run the command dism /online /export-driver /destination:<path>
- replace <path> with the path that you want the exported drivers to be saved to, e.g. c:\users\martin\downloads\driver-export\
- Note that the folder needs to exist, you get an error otherwise and no export.
The command exports all third-party drivers to the destination folder. Note that you may also use it to export drivers from an offline image using the following command (run from an elevated PowerShell prompt)
Export-WindowsDriver -Path c:\offline-image -Destination d:\drivers
Check out Microsoft's Docs website for a full list of available parameters.
The process may take a moment to complete. A test on a Surface Go device resulted in 101 exported drivers. The process took several minutes to complete.
The exported drivers are placed in the specified folder. Each driver is put in a separate folder.
Recognition may be difficult, as folder names may not reveal much about the driver. You may open the .inf file in a folder in a plain text editor to look up additional information.
Import the exported drivers
Importing can be done for individual drivers or, by using a special command, for all drivers.
You may right-click on an .inf file to install the driver. Another option that you have is to open the Windows Device Manager to use the update driver button. Using it, you get an option to pick a driver from the local system. Just pick the exported driver and wait for the process to complete.
A recursive import of all exported drivers requires the tool pnputil.exe. Run the following command in an elevated command prompt window:
pnputil.exe /add-driver <path>\*.inf /subdirs /install
Replace <path> with the full path of the exported drivers folder.
Closing Words
It takes a single command to export all third-party drivers on Windows systems. Using it before setting up a system anew or migrating to a new system may help users who don't have access to certain driver installations anymore. (via Born)


I don’t know how reliable ‘Windows Defender Firewall’, because here on Windows 7 with the OS’s firewall, some applications phone home although I’ve added an inbound and an outbound rule to block them. For instance, ‘EditPad’ Lite which attempts to connect to connect to news.jgsoft.com and which fails to do so only because I block that connection with a DNSCrypt-proxy blacklist rule, and here what shows DNSCrypt-proxy query log :
127.0.0.1 news.jgsoft.com A REJECT 0ms quad9-dnscrypt-ip4-filter-pri
quad9 is the DNS used with DNSCrypt-proxy. This means that Windows Firewall does not prevent an application added to its filters to connect to the Web, not always anyway.
So I do hope Windows Defender Firewall does a better job.
Hi Tom,
You write:”I don’t know how reliable ‘Windows Defender Firewall….”.
Let me tell you, based on my own experience, that firewall is really a POS (Piece Of Shit). It is really unreliable
Every software is able to write a firewall condition under windows i think, Windows Firewall is a trash
The first software that i always install (when i need internet in vboxed windows) is Simple Wall.
https://github.com/henrypp/simplewall
I also really like his version of Chromium https://github.com/henrypp/chromium
https://github.com/henrypp/simplewall
I also, “Simple Wall” is a favorite. That’s enough.
henrypp/chromium: Chromium builds with codecs | GitHub
https://github.com/henrypp/chromium
Chromium builds with codecs https://chromium.woolyss.com/
Download latest stable Chromium binaries (64-bit and 32-bit) |
https://chromium.woolyss.com/
It is very interesting.
And, “Notes” There are must-see value.
https://chromium.woolyss.com/#notes
There’s an easy page for blocking/allowing programs to go out in the main firewall window, click on:
Allow and App or feature through Windows Firewall.
Otherwise, good overview of rules creation. I’ve never had a program sneak out if its rule is set up right.
Yes, Windows defaults to letting most anything through as do other firewalls I’ve used. Probably preferrable to blocking everything except in critical security situations.
To quickly achieve the same end result as the steps above, I always install “OneClickFirewall” – less complex than anything like WFC, it just gives you a right click context menu on any exe for “Block internet access” and “Restore internet access”. Very handy!
https://winaero.com/download.php?view.1886
@ B
I downloaded the OCF program but I did not install it.
Virus Total found one two red engines:
Antiy-AVL – Trojan/Win32.Fuerboos
and
MaxSecure – Trojan.Malware.7164915.susgen
Nice article Ashwin.
Sometimes I like to quit (disable the Internet connection temporarily) all internet connection than I use the free software program for windows Net disabler v.1. 0 ( Latest release ’17-02-21).
https://www.sordum.org/9660/net-disabler-v1-0/
Here is the easiest methode to block Windows programs from accessing the internet ; Application name is FAB (Firewall Application blocker) it is a Portable freeware , usage is just drag and drop the Application icon
https://www.sordum.org/8125/firewall-app-blocker-fab-v1-6/
Thanks Ashwin. I always forget about the internals of Windows Firewall.
Just set up some outbound rules to block some apps that shouldn’t have internet access. Thanks again!
Ashwin, it doesn’t work.
Try this. Install steam and login. Rules wil be automatically created to allow steam.
Now log out and close steam. Change the firewall rules to block.
Open steam again and login in.
Go back to the firewall to find new allow rules created for it.
Basically, anyone willing to pay microsoft to be added to a “trusted list” gets a free ticket past the windows firewall wether you want them to or not.
Now go get Windows Firewall Control (I reccomend finding a pre MWB version) and install it and setup it up. Then turn on secure rules. Now repaet the steps with Steam and it will stay blocked.
Fast, free and simple solution for the beginners and non-professional: Firewall App Blocker https://www.sordum.org/8125/firewall-app-blocker-fab-v1-6/
Sordum’s Firewall App Blocker is great. Just right-click any exe file and it gets blocked in Windows Firewall, without going through all those steps. Also note, this feature is also in Sordum’s Easy Context Menu. All free.
https://www.tweakhound.com/2018/11/30/blocking-a-programs-internet-access-via-the-windows-firewall/
The heck with all of that. Just use a superior and much easier to use front end for the built in firewall. Malwarebytes Windows Firewall Control is excellent.
I’ll just put this here: TinyWall
What gets me most is that large number of windows processes is trying to get access to internet. Why? Windows DOES not need access to internet even to install it and can run without internet. The only possible exception being network management.
Just another case of spyware?
MS should be legislated to provide full description and reasons for those services demand for access as it is potentially abusing privacy.
@Jafp
Your logic is sketchy and lacks reasonable facts. Perhaps you need to be legislated.