Windows 7 Install Unsigned Drivers Remotely

Please first [|read this]

core files
I have found the simplest way to do this is have a folder like this (dpinst64.exe is renamed 64bit dpinst.exe)

├── CertMgr.Exe ├── dpinst64.exe ├── dpinst.xml └── drop-all-to-driver-folder-and-run-this.bat

Copy the contents into the driver's folder, then run "drop-all-to-driver-folder-and-run-this.bat" file (from a machine that has access to the target machine. This copies everything into the targets temp folder and executes it.


 * Note, The richud.com.cer self-signed certificate is assumed to be in the drivers folder already.

drop-all-to-driver-folder-and-run-this.bat
Basically the drivers and .bat are copied to the remote machine, psexec installs the cert into BOTH locations, dpinst installs the driver, contents of System32\DriverStore\FileRepository is listed, which should show its installed, then the certs are removed. (You can add a line to delete the folder in temp - the system we have at work has a GPO that empties it on logout so didnt bother!)

example output
_      __              __   _____(_)_____/ /_  __  ______/ / _________  ____ ___  / ___/ // ___/ __ \/ / / / __  / / ___/ __ \/ __ `__ \ / /  / // /__/ / / / /_/ / /_/ /_/ /__/ /_/ / / / / / / /_/  /_/ \___/_/ /_/\__,_/\__,_/(_)___/\____/_/ /_/ /_/

Remote Driver Installer ---=== Last updated 12/Jun/2012 ===---

Enter Hostname or IP :ua-xxxx Ping testing ua-xxxx... RPC testing ua-xxxx...

Machine alive and connectable!

Z:\Laserjet 1020\richud.com.cer Z:\Laserjet 1020\drv64.cab Z:\Laserjet 1020\hp1020.img Z:\Laserjet 1020\license.txt Z:\Laserjet 1020\License7z.txt Z:\Laserjet 1020\properties.ini Z:\Laserjet 1020\hp102064.cat Z:\Laserjet 1020\hp102032.cat Z:\Laserjet 1020\HPLJ1020.INF Z:\Laserjet 1020\SUHP1020.VER Z:\Laserjet 1020\ProductInst.exe Z:\Laserjet 1020\Setup.exe Z:\Laserjet 1020\DIFxAPI.dll Z:\Laserjet 1020\Strings.dll Z:\Laserjet 1020\CertMgr.Exe Z:\Laserjet 1020\dpinst.xml Z:\Laserjet 1020\dpinst64.exe Z:\Laserjet 1020\drop-all-to-driver-folder-and-run-this.bat Z:\Laserjet 1020\English\SDhp1020.chm Z:\Laserjet 1020\English\ZShp1020.chm Z:\Laserjet 1020\English\SUhp1020.ent Z:\Laserjet 1020\English\SDhp1020.SDD Z:\Laserjet 1020\English\zshp1020s.dll 23 File(s) copied

PsExec v1.98 - Execute processes remotelyFile:HP Laserjet 1022n self signed driver install.png Copyright (C) 2001-2010 Mark Russinovich Sysinternals - www.sysinternals.com

CertMgr Succeeded CertMgr Succeeded cmd exited on ua-xxxx with error code 1. Drivers now preinstalled on ua-xxxx 14/06/2012 14:02    . 14/06/2012 14:02              .. 14/06/2012 14:02              hplj1020.inf_amd64_neutral_e48c31f8099446c3 DPinst log here "\\ua-xxxx\c$\windows\DPINST.LOG"

PsExec v1.98 - Execute processes remotely Copyright (C) 2001-2010 Mark Russinovich Sysinternals - www.sysinternals.com

CertMgr Succeeded CertMgr Succeeded cmd exited on ua-xxxx with error code 0. Finished, remember to 'show hidden devices' in devmgr to see certain printers when have drivers installed. Press any key to continue. ..

(Not sure why there is "error code 1" from psexec, possibly funny return code from running dpinst inside a cmd /c subshell)