Overview of Printer Driver Isolation

23.Mar.2011 | by Gusac | Filed in: Articles, Tutorials

Print spooler crash isn't a rare phenomenon in IT Administration world. It is something that leaves an admin scratching his head, figuring out what is causing it. Most of the time it's due to some faulty printer driver and bigger the environment, harder it is to identify the culprit driver. But that's going to be the thing of past now. With Windows 2008 R2 and Windows 7 comes the Printer Driver Isolation.

As the name suggests, Printer Driver Isolation or PDI isolate the printer drivers files into a different process than Print spooler (spoolsv.exe). The isolated printer drivers are not loaded in the process space of spoolsv.exe but instead a different process. So, if any problem that occurs in the faulty drivers will cause the process they are loading in to fail instead of spoolsv.exe, hence preventing the production down time for Print servers.

The process that host the isolated printer driver files is PrintIsolationHost.exe. This process host the printer drivers which are set to be run isolated. If anything goes wrong with these drivers, they will cause PrintIsolationHost.exe to crash and not spoolsv.exe. The purpose of the driver isolation feature is to prevent print drivers that fail or behave badly from adversely affecting the print spooler process

There are three modes of Printer Driver Isolation:

  • None - Printer drivers are loaded in the spooler process, just like before.
  • Shared - Printer drivers set to run in a single shared instance of PrintIsolationHost.exe process, separated from the spooler process. This is the default mode.
  • Isolated - Each Printer driver is set to run in its own separate instance of PrintIsolationHost.exe process.

To check if Printer Driver support PDI: Navigate to the following registry location:
HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\<environment>\Drivers\Version-3\<driver>\PrinterDriverAttributes

Possible values:
0: Printer driver does not support PDI
2: Printer driver supports PDI
If the value is missing, it defaults to 0, that is, the driver does not support PDI

 

How to change the Printer Driver Isolation mode

There are three ways to determine Isolation mode for Printer drivers:

  • INF files associated with the printer driver
  • Print Management Console (PMC)
  • Group Policy

 

INF files associated with the printer driver

The printer driver inf files advertises whether the driver supports PDI or not. The inf files contains a the keyword DriverIsolation to indicate its support for the PDI. As mentioned above, value 0 indicates that the driver does not support PDI and the value 1 indicates it supports it. So, in an inf file, it should look like:

DriverIsolation=0
DriverIsolation=2
Again, If the keyword is not there then it defaults to 0

 

 

 

Print Management Console (PMC)

The print management console or PMC lets you manage the driver isolation easily. If you open the PMC and go to the Drivers for the print server you want to manage, it will list all the print drivers installed on that server along with their Isolation state. Below is the screenshot for your reference:

1

To change the Driver isolation, right click on the printer driver and select the option 'Set Driver Isolation. The drop down menu will all the available options.

Please note:

  • The System Default option is the setting defined in the driver itself by default or by group policy.
  • If group policy ‘Execute Print drivers in isolated processes’ is Disabled, then you cannot change the isolation mode.

image

Registry value for PDI settings:

The driver names, for which PDI mode was set explictly, are stored in registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\ [PrintDriverIsolationGroups]

image

The value data is stored in a format to differentiate the Isolation state. the format is: <None>\<None>\\<Shared>\<Shared>\\<Isolated>\<Isolated>

The three groups (None, Shared & Isolated) are separated by double slashes ‘\\’ and within each group, drivers are separated by single slash ‘\

Please note: For drivers which have Driver Isolation state as System Default, will not be listed in the registry. The registry contains names for the drivers for which PDI mode was change explicitly.

If you do not have any driver in one group then it will be left as it is but double slashes \\ would still be there.

 

Group Policy

There are two group policies for PDI ad they can be found under: Computer Configuration\Administrative Templates\Printers.

The Group policies are:

  • Execute print drivers in isolated processes
  • Override print driver execution compatibility setting reported by print driver

Policy: Execute print drivers in isolate processes:

This policy setting determines whether the print spooler will execute print drivers in an isolated or separate process. When print drivers are loaded in an isolated process (or isolated processes), a print driver failure will not cause the print spooler service to fail.

If you enable or do not configure this policy setting, the print spooler will execute print drivers in an isolated process by default.

If you disable this policy setting, the print spooler will execute print drivers in the print spooler process.


Notes:
-Other system or driver policy settings may alter the process in which a print driver is executed.
-This policy setting applies only to print drivers loaded by the print spooler. Print drivers loaded by applications are not affected.
-This policy setting takes effect without restarting the print spooler service.

 

Policy: Override print driver execution compatibility setting reported by print driver:

This policy setting determines whether the print spooler will override the Driver Isolation compatibility reported by the print driver. This enables executing print drivers in an isolated process, even if the driver does not report compatibility.

If you enable this policy setting, the print spooler will ignore the Driver Isolation compatibility flag value reported by the print driver.

If you disable or do not configure this policy setting, the print spooler will use the Driver Isolation compatibility flag value reported by the print driver.

Notes:
-Other system or driver policy settings may alter the process in which a print driver is executed.
-This policy setting applies only to print drivers loaded by the print spooler. Print drivers loaded by applications are not affected.
-This policy setting takes effect without restarting the print spooler service.