8

Is this possible to disable or remove the right click on a file print option? Seems like it should be possible.

  • 1
    Why per se is this a problem? If you don't want users to print don't install printers. – Brent Pabst Oct 9 '12 at 18:32
  • 3
    It's super irritating when you want to right click to "edit" (view) a file and mouse click lands on print instead. – SimplyInk Dec 12 '16 at 6:51
  • 2
    I printed my batch file 3 times today, when I just wanted to 'edit' – Sergey Oct 9 '17 at 20:45
8

Those kinds of options on the right-click menu are assigned per file type. If you're only interested in targeting a few file types, you can remove the print command from those file types.

For example, for PDF documents, go to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf and look at the default value. On my computer, the value is AcroExch.Document. So then you would go to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroExch.Document\Shell and delete the print subkey.

8

Although you evidently have to remove these registry keys for individual file types, this is the most comprehensive list for it that I've found:

Windows Registry Editor Version 5.00

;--------
;-------- Remove "Print" from context menu for image files
;--------
[-HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\print]


;-------- 
;-------- Remove Print From common text-based files
;-------- 
[-HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\print]
[-HKEY_CLASSES_ROOT\batfile\shell\print]
[-HKEY_CLASSES_ROOT\cmdfile\shell\print]
[-HKEY_CLASSES_ROOT\docfile\shell\print]
[-HKEY_CLASSES_ROOT\fonfile\shell\print]
[-HKEY_CLASSES_ROOT\htmlfile\shell\print]
[-HKEY_CLASSES_ROOT\inffile\shell\print]
[-HKEY_CLASSES_ROOT\inifile\shell\print]
[-HKEY_CLASSES_ROOT\JSEFile\shell\print]
[-HKEY_CLASSES_ROOT\JSFile\shell\print]
[-HKEY_CLASSES_ROOT\MSInfo.Document\shell\print]
[-HKEY_CLASSES_ROOT\otffile\shell\print]
[-HKEY_CLASSES_ROOT\pfmfile\shell\print]
[-HKEY_CLASSES_ROOT\regfile\shell\print]
[-HKEY_CLASSES_ROOT\rtffile\shell\print]
[-HKEY_CLASSES_ROOT\ttcfile\shell\print]
[-HKEY_CLASSES_ROOT\ttffile\shell\print]
[-HKEY_CLASSES_ROOT\txtfile\shell\print]
[-HKEY_CLASSES_ROOT\VBEFile\shell\print]
[-HKEY_CLASSES_ROOT\VBSFile\shell\print]
[-HKEY_CLASSES_ROOT\Wordpad.Document.1\shell\print]
[-HKEY_CLASSES_ROOT\WPEDoc\shell\print]
[-HKEY_CLASSES_ROOT\WPSDoc\shell\print]
[-HKEY_CLASSES_ROOT\wrifile\shell\print]
[-HKEY_CLASSES_ROOT\WSFFile\shell\print]

;-------- 
;-------- Remove Print From Internet Shortcut
;-------- 
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\InternetShortcut\shell\print]

;-------- 
;-------- Remove Print From Acrobat-/Foxit-registered .pdf files
;-------- 
[-HKEY_CLASSES_ROOT\AcroExch.Document.7\shell\print]
[-HKEY_CLASSES_ROOT\FoxitReader.Document\shell\print]

You can copy and paste this into a file of type .reg and double-click it to run it.

From here

2

You can disable Explorer's context menu with a GPO.

  • Is it possible to edit the context menu to only disable the print option? As the other options should still be able – Jjsquared Oct 9 '12 at 18:52
  • Not that I know of. Why do you need to disable the ability to print? You may need to look into AD RMS. – joeqwerty Oct 9 '12 at 18:56
  • Is it possible to edit the context menu to only disable the print option? Yes, this is possible, as the context menu (and all its entries) are controlled by simple registry keys. The Print option, however, is held in multiple keys (one per file type), which makes it a pain to get rid of. Maybe I'll post a how-to after work, if my new game isn't waiting for me when I get home, but honestly, the better approach is to just ignore it, and/or severely beat users who bug you about it so they shut up. – HopelessN00b Oct 9 '12 at 19:05
2

You can use REG QUERY to pull back an array of registry items that end in 'shell\print'. Using an elevated PowerShell prompt you can filter the results and pipe to REG DELETE to remove them.

# get an array of 
$regprint = REG QUERY HKCR /f print /s /e /k | ?{$_ -like '*shell\print'}
# here you can check the array to make sure it is what you want to remove
# and you can pipe it into REG DELETE
$regprint.foreach({REG DELETE $_ /va /f})
1

For entire classes, and this works especially well to get rid of EDIT and PRINT for all images (which are useless entries, in my opinion), go to:

HKEY_CLASSES_ROOT\SystemFileAssociations\image, go to the node containing the command you want to disable, and make a new STRING value entitled "LegacyDisable" under that node.

So, for example, if you want to disable "edit", go to HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit, and make a new STRING value entitled "LegacyDisable" under that node.

1

disable_print.bat

@setlocal
@echo off

echo wait ~minute

@for /F "tokens=*" %%a in ('REG QUERY HKCR /f print /e /s /k ^| findstr /i /r .print$')     
do (
    echo %%a
    reg add %%a /v LegacyDisable /t REG_SZ
)
0

Love the answers posted, but I prefer to hide/disable. source

If you want to hide one of these items so that you’ll have to Shift+Right-Click, then you can add a new string value on the right-hand side and name it “Extended” like you can see below:

enter image description here

If you’d like to disable it instead, but don’t want to delete the key, you can add a new string value and call it “LegacyDisable”.

enter image description here

0

You can use ShellMenuView to edit or disable any context menu item, and you can also jump to the registry entry for editing.

http://www.nirsoft.net/utils/shell_menu_view.html

ShellMenuView

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.