SCCM package using pnputil.exe to install a printer driver

Simply create a package containing the printer driver and launch pnputil.exe. If the printer driver is already installed on a client, one way is to take the driver from the driver store on this machine. To locate the driver in the driver store is to check the registry under the following key.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\

Or for x86…

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\

One thing to bear in mind is that the SCCM agent is a 32-bit application and launches a 32-bit version of cmd.exe. I use a small wrapper to take care of this and to ensure pnputil.exe is launching a 64bit cmd.exe on 64bit OS.

  %SystemRoot%\Sysnative\cmd.exe /c %0 %*
pnputil.exe -i -a <PathToDriver>/<Driver>.inf
Posted in Uncategorized