Windows 10: How to remove system default drivers using DISM on an offline image

Associate
Joined
19 Sep 2022
Posts
817
Location
Pyongyang
I have tried to remove system default (or inbox) drivers from an offline mounted image of Win 10 using DISM Remove-Driver command
e.g. Dism /Image C:\w10_dism\image /Remove-Driver /Driver:1394.inf

..but the utility doesn't allow me to do this, returns error 50: dism cant remove system default drivers
There's supposed to be a way to unflag the drivers as non-system drivers so that dism can execute the command successfully.
I am looking for a detailed walkthrough on how to achieve this.
 
Last edited:
i was doing some r&d with windows and found around 500 drivers that i am never going to use, so i thought of getting rid of those.. but i think you could unflag those drivers in the mounted image, this worked with win 7 and then use dism to clear them out - but i am no expert in dism, having used the utility only a couple of times
 
ok i figured this out with google's help..
you have to modify the Version key of the driver in image registry. The version key for default drivers starts with FF which has to be changed to 00 which removes the default flag from the driver
to modify keys, you have to first load the image registry (imgfolder/Windows/system32/config/DRIVERS) to host registry and edit it out from there
the version key is in binary format
after that the remove-driver command works successfully - now i would need a script to automate this
 
Last edited:
It's something you could do with powershell but honestly i wouldn't bother, not only are you not saving much space but you're just asking for trouble as in typical MS fashion you'll probably find some driver, like that firewire driver, is responsible for things you'd never think of.

Plus if the driver isn't needed it doesn't get loaded so all you'll be doing is saving a few MB at most, personally i use something like ServiWin from NirSoft to see what drivers get loaded and then call a powershell script from the AutoUnattend.xml during install. At least that way if you find something doesn't work later you can re-enable it fairly easily.
 
Last edited:
Back
Top Bottom