Scripting: Disabling ‘Advanced Printer Features’ via Command-Line
By default, Windows enables a feature called “Advanced Printer Features” for all printers. In fact, despite the name, all it does is allow Windows to use all the additional functions of the printer driver in addition to those provided by Windows. However, some printer driver issues can be resolved by turning this option off, either temporarily or permanently. This is easily done via the Advanced tab of the printer driver properties:
Updating printer drivers may put the setting back to the default, or you may decide to roll the setting out to a large number of machines. To make this process a bit simpler, it can be set via the command-line:
If the printer as specified doesn't exist, Windows will display “Operation could not be completed (error 0x00000709). Make sure that you have typed the name correctly, and that the printer is attached to the network”.
If you don't know the printer names on each workstation in advance, or you need to roll out across many system with different printers, use:
for /f "tokens=1-7,* delims=\" %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers"') do if /i '%%h neq ' rundll32 printui.dll,PrintUIEntry /Xs /n "%%h" attributes +RawOnly