The "Manage new Point and Print default driver installation behavior" basically boils down to three options, as posted in this Microsoft support article - https://support.microsoft.com/en-us/topic/kb5005652-manage-new-point-and-print-default-driver-installation-behavior-cve-2021-34481-873642bf-2634-49c5-a23b-6d8e9a302872
If you set "RestrictDriverInstallationToAdministrators" as not defined or to 1, depending on your environment, users must use one of the following methods to install printers:
- Provide an administrator username and password when prompted for credentials when attempting to install a printer driver.
- Include the necessary printer drivers in the OS image.
- Use Microsoft System Center, Microsoft Endpoint Configuration Manager, or an equivalent tool to remotely install printer drivers.
- Temporarily set RestrictDriverInstallationToAdministrators to 0 to install printer drivers.
Granting administrator permissions to a standard user or setting the "RestrictDriverInstallationToAdministrators" registry key to "0" are not the most secure options to protect your user community, and not everyone has access to Microsoft System Center, Endpoint Configuration Manager, or an equivalent tool, so that just leaves "including the necessary printer drivers in the OS image".
Windows has a built in tool (since Vista) to help install printer drivers to the local Windows Driver Store called "PRNDRVR.VBS" - you can find information on how to use it here: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc754632(v=ws.11)
I used a batch file to install printer drivers on a user's system so that when they map a network printer (by GPO or through the add printer wizard) they won't be prompted for administrator credentials because the driver will already exist in the local Windows Driver Store. The batch file looks like this:
@Echo off
rem Canon imagePROGRAF 605
c:\windows\system32\cscript.exe %windir%\system32\printing_admin_scripts\en-us\prndrvr.vbs -a -m "Canon iPF605" -v 3 -e "Windows x64" -h "[UNC path to the driver folder]" -i "[UNC path to the INF file inside the driver folder]"
There are 3 caveats though:
- The driver name used in the -m command of the batch file has to match the name listed in the driver INF file
- The driver you install has to exactly match the driver used by the print queue
- The batch file needs to be run as the local System account (or some other elevated account)
The problem, where I'm hoping all you smart people can help me out, is that I've run into a print queue that won't install without elevated credentials, even though the driver already exists in the local Windows Driver Store (because I installed it using the batch file). I've confirmed that the driver I'm installing via the batch file is the same driver currently used by the print queue (same driver name, version number, driver date, provider, etc) but no matter how I map this printer (add printer wizard, GPO, using \servername in Windows Explorer and then double-clicking on the shared printer) I am still prompted for administrator credentials to install the driver.
Does anyone have any suggestions on how to get past this?