4

I would like to remove the Text Document and Bitmap image items from the context menu's New menu, but I am unable to find the items in the Registry. I was able to remove other items from the New menu, but these two items don't seem to be stored in the same place as other new item shortcuts:

  • I looked in both HKCR\.bmp and HKCR\.txt, with neither having the ShellNew key, nor are they stored within:
    HKCR\*\shell
    HKCR\*\shellex\ContextMenuHandlers
    HKCR\AllFileSystemObjects\ShellEx
    HKCR\Directory\shell
    HKCR\Directory\shellex\ContextMenuHandlers
    
  • I used Nirsoft's ShellMenuNew and Bitmap Image and Text Document do not appear
  • I have tried the suggestions listed in this question and How-To Geek article
JW0914
  • 9,096
RHPT
  • 1,332

3 Answers3

5

It has to do with the fact that Notepad and Paint are now UWP apps; to remove the context menu entries, you have to uninstall Notepad and Paint. There is another way, but it requires mucking into the apps themselves.

Found an answer to this on Windows ElevenForum:

To remove .txt and .bmp from Create > New Context Menu without removing Notepad and Paint components from Windows... remove the line starting with <uap:FileType uap4:ShellNewFileName= from:

  • Paint:
    C:\Program Files\WindowsApps\Microsoft.Paint_11.2110.0.0_x64__8wekyb3d8bbwe\AppxManifest.xml
    
  • Notepad:
    C:\Program Files\WindowsApps\Microsoft.WindowsNotepad_10.2103.7.0_x64__8wekyb3d8bbwe\AppxManifest.xml*
    
  • Note: %ProgramFiles%\WindowsApps\ can't be edited even with Administrator privleges, and the change will most likely get reset each time there's a new app version released
JW0914
  • 9,096
RHPT
  • 1,332
0

Renaming HKCR\.txt\ShellNew to HKCR\.txt\xShellNew [likewise with .bmp] was sufficient to remove the entry from the context menu: Screenshot

ShellNew keys I found on my computer:

PS HKCR:\>> gci -s | ? PSCHildName -eq 'ShellNew' | select -expand name

HKEY_CLASSES_ROOT.api\AcroExch.Plugin\ShellNew HKEY_CLASSES_ROOT.contact\ShellNew HKEY_CLASSES_ROOT.fdf\AcroExch.FDFDoc\ShellNew HKEY_CLASSES_ROOT.library-ms\ShellNew HKEY_CLASSES_ROOT.lnk\ShellNew HKEY_CLASSES_ROOT.odg\LibreOffice.DrawDocument.1\ShellNew HKEY_CLASSES_ROOT.odp\LibreOffice.ImpressDocument.1\ShellNew HKEY_CLASSES_ROOT.ods\LibreOffice.CalcDocument.1\ShellNew HKEY_CLASSES_ROOT.odt\LibreOffice.WriterDocument.1\ShellNew HKEY_CLASSES_ROOT.pdx\PDXFileType\ShellNew HKEY_CLASSES_ROOT.rtf\ShellNew HKEY_CLASSES_ROOT.secstore\AcroExch.SecStore\ShellNew HKEY_CLASSES_ROOT.xdp\AcroExch.XDPDoc\ShellNew HKEY_CLASSES_ROOT.xfdf\AcroExch.XFDFDoc\ShellNew HKEY_CLASSES_ROOT.zip\CompressedFolder\ShellNew HKEY_CLASSES_ROOT\CLSID{a5a3563a-5755-4a6f-854e-afa3230b199f}\ShellNew HKEY_CLASSES_ROOT\Folder\ShellNew HKEY_CLASSES_ROOT\WOW6432Node\CLSID{a5a3563a-5755-4a6f-854e-afa3230b199f}\ShellNew

JW0914
  • 9,096
Keith Miller
  • 10,694
  • 1
  • 20
  • 35
0

To remove:

  • Bitmap Image:
    # PowerShell $env:UserProfile variable used | Cmd: Replace with %UserProfile%
    

    Backup key within the Registry and delete:

    Reg Copy "HKCR.bmp\ShellNew" "HKCR.bmp\CustomDisabled\ShellNew" /s /f Reg Delete "HKCR.bmp\ShellNew" # To restore: Reg Copy "HKCR.bmp\CustomDisabled\ShellNew" "HKCR.bmp\ShellNew" /s /f

    Backup key within a file and delete:

    MkDir "$env:UserProfile\Documents\RegistryBackup" Reg Export "HKCR.bmp\ShellNew" "$env:UserProfile\Documents\RegistryBackup\bmp-ShellNew.reg" Reg Delete "HKCR.bmp\ShellNew" # To restore: Reg Import "$env:UserProfile\Documents\RegistryBackup\bmp-ShellNew.reg"


  • Text Document:
    # PowerShell $env:UserProfile variable used | Cmd: Replace with %UserProfile%
    

    Backup key within the Registry and delete:

    Reg Copy "HKCR.txt\ShellNew" "HKCR.txt\CustomDisabled\ShellNew" /s /f Reg Delete "HKCR.txt\ShellNew" # To restore: Reg Copy "HKCR.txt\CustomDisabled\ShellNew" "HKCR.txt\ShellNew" /s /f

    Backup key within a file and delete:

    MkDir "$env:UserProfile\Documents\RegistryBackup" Reg Export "HKCR.txt\ShellNew" "$env:UserProfile\Documents\RegistryBackup\txt-ShellNew.reg" Reg Delete "HKCR.txt\ShellNew" # To restore: Reg Import "$env:UserProfile\Documents\RegistryBackup\txt-ShellNew.reg"



References:

  • Reg: Copy | Delete | Export | Import
  • Default HKCR\.bmp and HKCR\.txt keys:
    Windows Registry Editor Version 5.00
    

    [HKEY_CLASSES_ROOT.bmp] @="Paint.Picture" "Content Type"="image/bmp" "PerceivedType"="image"

    [HKEY_CLASSES_ROOT.bmp\OpenWithList]

    [HKEY_CLASSES_ROOT.bmp\OpenWithList\MSPaint.exe] @=""

    [HKEY_CLASSES_ROOT.bmp\OpenWithProgids] "AppX2jm25qtmp2qxstv333wv5mne3k5bf4bm"=hex(0): "AppX43hnxtbyyps62jhe9sqpdzxn1790zetc"=hex(0): "AppXcdh38jxzbcberv50vxg2tg4k84kfnewn"=hex(0): "Paint.Picture"=""

    [HKEY_CLASSES_ROOT.bmp\PersistentHandler] @="{098f2470-bae0-11cd-b579-08002b30bfeb}"

    [HKEY_CLASSES_ROOT.bmp\ShellNew] "ItemName"=hex(2):40,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,
    73,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,
    00,70,00,61,00,69,00,6e,00,74,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,35,00,
    39,00,34,00,31,00,34,00,00,00 "NullFile"=""

    [HKEY_CLASSES_ROOT.txt] @="txtfile" "Content Type"="text/plain" "PerceivedType"="text"

    [HKEY_CLASSES_ROOT.txt\OpenWithProgids] "VSCode.txt"=""

    [HKEY_CLASSES_ROOT.txt\PersistentHandler] @="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

    [HKEY_CLASSES_ROOT.txt\ShellNew] "ItemName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,
    6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,
    00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,
    2d,00,34,00,37,00,30,00,00,00 "NullFile"=""

JW0914
  • 9,096