Disallow installation of printers using kernel-mode drivers
Interdire l’installation d’imprimantes utilisant des pilotes en mode noyau
Explanation
Determines whether printers using kernel-mode drivers may be installed on the local computer. Kernel-mode drivers have access to system-wide memory, and therefore poorly-written kernel-mode drivers can cause stop errors.
If you disable this setting, or do not configure it, then printers using a kernel-mode drivers may be installed on the local computer running Windows XP Home Edition and Windows XP Professional.
If you do not configure this setting on Windows Server 2003 family products, the installation of kernel-mode printer drivers will be blocked.
If you enable this setting, installation of a printer using a kernel-mode driver will not be allowed.
Note: By applying this policy, existing kernel-mode drivers will be disabled upon installation of service packs or reinstallation of the Windows XP operating system. This policy does not apply to 64-bit kernel-mode printer drivers as they cannot be installed and associated with a print queue.
Détermine s’il est possible d’installer des imprimantes utilisant des pilotes en mode noyau sur l’ordinateur local. Les pilotes en mode noyau ont accès à la mémoire système, par conséquent, ceux qui sont mal écrits peuvent provoquer des erreurs d’interruption.
Si vous désactivez ce paramètre ou si vous ne le configurez pas, il est possible d’installer des imprimantes utilisant des pilotes en mode noyau sur l’ordinateur local exécutant Windows XP Édition familiale ou Windows XP Professionnel.
Si vous ne configurez pas ce paramètre sur les produits de la famille Windows Server 2003, l’installation des pilotes d’impression en mode noyau est bloquée.
Si vous activez ce paramètre, l’installation d’une imprimante utilisant un pilote en mode noyau n’est pas autorisée.
Remarque : si vous appliquez cette stratégie, les pilotes en mode noyau existants sont désactivés lors de l’installation de Service Packs ou de la réinstallation du système d’exploitation Windows XP. Cette stratégie ne s’applique pas aux pilotes d’impression en mode noyau 64 bits car ceux-ci ne peuvent pas être installés et associés à une file d’attente à l’impression.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers- Value name
KMPrintersAreBlocked
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: Printing/KMPrintersAreBlocked
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'KMPrintersAreBlocked' -Value 1 -Type DWordDisable
# Disable: Printing/KMPrintersAreBlocked
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'KMPrintersAreBlocked' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Printing/KMPrintersAreBlocked
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
Remove-ItemProperty -Path $k -Name 'KMPrintersAreBlocked' -ErrorAction SilentlyContinue