dpinst.exe is a Driver Package INSTaller that comes from the Microsoft Windows Driver Kit
Different versions of the WDK are compatible with different versions of the Windows client OS and their equivalent server OS.
Microsoft Windows Driver Kit 7.1.0 (WXP)
Microsoft Windows Driver Kit 8.0 (Vista)
Microsoft Windows Driver Kit 8.1.u1 (Win7, Win8, Win8.1)
Microsoft Windows Driver Kit 10.0.10586.0 (Win7, 8, 8.1, 10)
Microsoft Windows Driver Kit 10.0.14393.0 (Win7, 8, 8.1, 10) but doesn’t come with a new dpinst.
There are different versions for 32bit and 64bit OSes.
dpinst32.exe: installs and uninstalls driver packages.
By default, the tool searches the current directory and tries to install all driver packages found.
Usage: <path>\dpinst32.exe [/U INF-file][/S | /Q][/LM][/P][/F][/SH][/SA][/A][/PATH Path][/EL][/L LanguageID][/C][/D][/LogTitle Title][/SW][/? | /h | /help]
/U INF-file Uninstall a driver package (INF-file).
/S | /Q Silent (Quiet) mode. Suppresses the Device Installation Wizard and any dialogs popped-up by the operating system.
/LM Legacy mode. Accepts unsigned driver packages and packages with missing files. These packages won't install on the latest version of Windows.
/P Prompt if the driver package to be installed is not better than the current one.
/F Force install if the driver package is not better than the current one.
/SH Scans hardware for matching devices and only copies and installs those drivers for which a device is present. Only valid for Plug and Play drivers.
/SA Suppress the Add/Remove Programs entry normally created for each driver package.
/A Install all or none.
/PATH Path Search for driver packages under the given path.
/EL Enables all languages not explicitly listed in the XML file.
/L LanguageID Tries to use the given language in all UI. Useful for localization tests.
/SE Suppress the EULA.
/C Dump logging output to attached Console (Windows XP and above).
/D Delete driver binaries on uninstall.
/SW Suppresses the Device Installation Wizard, the operating system might still pop-up user dialogs.
/? | /h | /help Shows this help.
If a dpinst.xml is in the same path as the .exe when invoked, the dpinst.exe will use the values in that .xml. I use:
<?xml version="1.0" ?>
<dpinst>
<!-- equivalent to /sa -->
<suppressAddRemovePrograms/>
<!-- The following search and subDirectory elements direct DPInst to search all subdirectories (under the DPInst working directory) to locate driver packages. -->
<search>
<subDirectory>*</subDirectory>
</search>
<!-- The following language element localizes its child elements for the English (Standard) language. The child elements customize the text that appears on the DPInst wizard pages. -->
<language code="0x0409">
<dpinstTitle>Device Driver Updater</dpinstTitle>
<welcomeTitle>Welcome to the Device Installer!</welcomeTitle>
<welcomeIntro>This wizard will walk you through updating the drivers for your device.</welcomeIntro>
<installHeaderTitle>Installing the software for your device...</installHeaderTitle>
<finishTitle>Congratulations! You finished installing your device drivers.</finishTitle>
</language>
<!-- equivalent to /sh -->
<scanHardware/>
</dpinst>
The important bit in this .xml is that it tells dpinst to recursively scan all subdirs at the location specified for all drivers.
By using that .xml along with this command in a post-sysprep or even mid-sysprep script I can force the computer to install drivers when I want to, instead of waiting for Windows to do it at its leisure:
<path>:\dpinst.exe /path "<the path to the drivers I want to use>" /q /se
DPInst will only install those drivers needed by your hardware, provided of course the necessary driver is in your path. Once completed, the script then deletes the folder(s) that held the original drivers, thus freeing up space.
I prefer to use DPInst to install drivers coming out of sysprep, instead of injecting with dism, pnputil or other methods because with each driver you inject, whichever method you use, the registry bloats and can in extreme cases cause the OS to become unstable; yes I’ve done this while prepping a HW-agnostic image ready to drop onto any of 26 very different platforms. This is an MS documented problem with at least Windows 7. I haven’t looked back on the methodology so I don’t know if it can still be an OS killer on Windows 8.1 or 10.
Installing drivers mid- or post-sysprep means I have a large 1-3GB repository to install from that is included in the image, but it means the devices are ready on my terms.