"Create new text document" option missing from context menu

"Create new text document" option missing from context menu

I noticed today that there is no longer a "Create new text document" option in my Windows 7 (x64 Ultimate) context menu when I right click. No idea how or when it disappeared, point is it's gone.

After searching Google for people with the same problem I tried following a post in this guide.

But I got stuck right away because I don't see a .txt key in my registry under HKEY_CLASSES_ROOT. I only see a .text but I am not sure if that is the same thing.

Antwort1

I gained access to another PC running Windows 7, a computer on which the context menu was intact. I peeked at the registry of this machine and copied exactly what was entered. Doing so resolved the problem on my desktop with the broken context menu.

Following all the instructions listed above, the two Strings within the .txt key that I needed were Content Type and PerceivedType.

So then to recap, if you are facing a similar issue, here is what I did to fix this problem. Hopefully it works for you as well.

(First backup the Registry.)

  1. Open regedit.exe
  2. Expand HKEY_CLASSES_ROOT and look for a .txt key. If none exist, create one.
  3. Within the .txt key, create two new Strings: Content Type and PerceivedType.
  4. (Right click) Modify... and the value for Default should be txtfile.
  5. (Right click) Modify... and the value for Content Type should be text/plain.
  6. (Right click) Modify... and the value for PerceivedType should be text.
  7. Create a new key with the name ShellNew within the .txt key.
  8. Within the ShellNew key, create a new String with the name NullFile.
  9. Within the ShellNew key, create a new Expandable String Value with the name ItemName.
  10. (Right click) Modify... and the value for ItemName should be @%SystemRoot%\system32\notepad.exe,-470

Here are two screenshots of what the final outcome should be:

Bildbeschreibung hier eingeben

Bildbeschreibung hier eingeben

Antwort2

Create a new file with the .reg extension, copy, paste, save and run.

Windows Registry Editor Version 5.00

; clear the key
[-HKEY_CLASSES_ROOT\.txt]

; and recreate
[HKEY_CLASSES_ROOT\.txt]
"PerceivedType"="text"
@="txtfile"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.txt\ShellNew]
; @C:\Windows\system32\notepad.exe,-470
"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,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"=""

Antwort3

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.txt]

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

[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"=""

[-HKEY_CLASSES_ROOT\txtfile]

[HKEY_CLASSES_ROOT\txtfile]
"EditFlags"=dword:00010000
@="Text Document"
"FriendlyTypeName"=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,36,00,39,00,00,00

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@=hex(2):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,69,00,6d,00,\
  61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,\
  00,30,00,32,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@=hex(2):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,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):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,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\txtfile\shell\printto]

[HKEY_CLASSES_ROOT\txtfile\shell\printto\command]
@=hex(2):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,20,00,2f,00,70,00,74,\
  00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,00,22,00,\
  25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00

[-HKEY_CLASSES_ROOT\SystemFileAssociations\.txt]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt]
"PerceivedType"="document"

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt]

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList]
"a"="NOTEPAD.EXE"
"MRUList"="a"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids]
"txtfile"=hex(0):

Antwort4

Just add the .txt key yourself and then make sure that the following string value is there:

HKEY_CLASSES_ROOT\.txt\ShellNew\NullFile

The shell will use it to decide which items to put on the 'New' menu.

Bildbeschreibung hier eingeben

Microsoft has a KB article about it here: http://support.microsoft.com/kb/140333

If you're adding a brand new type (or fixing a broken one) you may need to add another entry to specify the text used. The default entry for the HKCR.txt should be 'txtfile'. Then make sure you have a HKCR\txtfile entry with default entry something like 'Text Document':

Bildbeschreibung hier eingeben

Close all instances of Explorer (ideally reboot) and that should work.

verwandte Informationen