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.
-
Have a look a this post: superuser.com/questions/34704/…Ganesh R.– Ganesh R.2013年08月09日 07:19:41 +00:00Commented Aug 9, 2013 at 7:19
15 Answers 15
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.)
- Open
regedit.exe - Expand
HKEY_CLASSES_ROOTand look for a.txtkey. If none exist, create one. - Within the
.txtkey, create two new Strings:Content TypeandPerceivedType. - (Right click) Modify... and the value for
Defaultshould betxtfile. - (Right click) Modify... and the value for
Content Typeshould betext/plain. - (Right click) Modify... and the value for
PerceivedTypeshould betext. - Create a new key with the name
ShellNewwithin the.txtkey. - Within the
ShellNewkey, create a new String with the nameNullFile. - Within the
ShellNewkey, create a new Expandable String Value with the nameItemName. - (Right click) Modify... and the value for
ItemNameshould be@%SystemRoot%\system32\notepad.exe,-470
Here are two screenshots of what the final outcome should be:
Enter image description here
Enter image description here
-
6Diddnt really work for me, it seems that windows limits the number of entries on the context menu- I just removed some programs which had added context items and txt showed up.Hightower– Hightower2014年11月20日 08:46:05 +00:00Commented Nov 20, 2014 at 8:46
-
5To make it work i had to delete all other folders under .txt except ShellNewebilcari– ebilcari2015年06月06日 07:40:19 +00:00Commented Jun 6, 2015 at 7:40
-
it worked fine here, you just need to log off after making changes to the registryRemo Harsono– Remo Harsono2015年07月14日 04:25:07 +00:00Commented Jul 14, 2015 at 4:25
-
Worked perfectly on Windows 10, without reboot, after deleting 5 unnecessary other context menu items.Tamás Bolvári– Tamás Bolvári2016年03月25日 08:52:07 +00:00Commented Mar 25, 2016 at 8:52
-
7Here, Notepad++ had seemingly changed the default value (at least its value was "Notepad++_file"). Changing it back to "txtfile" did the trick.Till Kolditz– Till Kolditz2017年02月18日 13:41:24 +00:00Commented Feb 18, 2017 at 13:41
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"=""
-
1Also, restart explorer afterwards (or just reboot)dlf– dlf2015年06月21日 13:58:56 +00:00Commented Jun 21, 2015 at 13:58
-
Can you also mention how can I change the Label like instead of "New Text Document" add "New Text File" ?Vicky Dev– Vicky Dev2021年10月24日 17:01:44 +00:00Commented Oct 24, 2021 at 17:01
-
@VickyDev no easy way, as expected of Windows, which in this case forces you to use only localized strings using its "MUI" technology, which stores everything in a binary format. After you compile the binary (docs.microsoft.com/en-us/windows/win32/intl/…), you have to replace the default value of "ItemName", which is "@%SYSTEM%\notepad.exe,-470", to a reference to the compiled string using an "indirect string" pointer (docs.microsoft.com/en-us/windows/win32/intl/…).rindeal– rindeal2021年10月26日 20:15:43 +00:00Commented Oct 26, 2021 at 20:15
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):
-
6While this may answer the question, it would be a better answer if you could provide some explanation why it does so.2015年02月15日 09:38:05 +00:00Commented Feb 15, 2015 at 9:38
-
1Worked for me on Win10, no restart needed.MTAdmin– MTAdmin2017年12月09日 18:41:41 +00:00Commented Dec 9, 2017 at 18:41
-
Can you also mention how can I change the Label like instead of "New Text Document" add "New Text File" ?Vicky Dev– Vicky Dev2021年10月24日 17:01:53 +00:00Commented Oct 24, 2021 at 17:01
-
This is the only solution that works.Hsien-Chih Chang 張顯之– Hsien-Chih Chang 張顯之2022年01月09日 20:17:41 +00:00Commented Jan 9, 2022 at 20:17
Microsoft updates sometimes change permissions thereby killing acls for context features. After all these years it still happens to some of us.
- Go to
Desktop-> mouse 2 -> New - The populated Context Menu should be present.
If not, see earlier posts and check/fix the registry (great stuff!).
If yes, but not inside folders, then
- Go to
documents-> Mouse 2 -> New - If a folder is the only choice you get, then you've been excluded. To fix this make a "New Folder" in Documents, open it and then on a blank space inside that folder
Mouse 2 -> Properties-> Security(Tab)-> <user name> -> Permissions for <user name> -> Allow(I recommend "Full Control" for yourself)-> Apply.
I didn't need to reboot. I got this from a brainiac maniac in IT at work, hope this helps you too.
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.
enter image description here
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':
enter image description here
Close all instances of Explorer (ideally reboot) and that should work.
-
1I tried all these suggestions and still no create new text document option. I even tried downloading a program mentioned in the other thread linked by Ganesh, the program called ShellNewHandeler. No .txt option in my context.Matt– Matt2013年08月09日 14:18:30 +00:00Commented Aug 9, 2013 at 14:18
-
Updated to include information about the 'txtfile' entry.snowdude– snowdude2013年08月12日 13:09:34 +00:00Commented Aug 12, 2013 at 13:09
-
Thanks for your help. However, for some reason still no context menu entry for text documents. My registry editor screenshot looks identical to yours. Is it possible some sort of software is conflicting causing this?Matt– Matt2013年08月18日 16:44:39 +00:00Commented Aug 18, 2013 at 16:44
-
Try creating a dummy key (e.g. for '.tst'). That's how I tested out these instructions. It didn't work for me until I created a tstfile entry and pointed the .tst default key to it.snowdude– snowdude2013年08月19日 09:22:09 +00:00Commented Aug 19, 2013 at 9:22
I had this same problem, and even though all the registry keys appeared to be correct, the option for a new Text Document stubbornly refused to appear.
Only after also adding an empty text file named empty.txt to my machine's \Windows\ShellNew folder, did the option show up for me. (The "empty" part of the name appears irrelevant -- Windows will look up the file type's friendly name in the registry. But the extension matters.)
Don't ask me why/how/when the file disappeared...or became required, if it wasn't already there at some point. But that last step is what made things work in my case.
1. Click on HKEY_CLASSES_ROOT and look for a .txt in regedit.exe
2. Do export and (keep a copy as a backup) and copy paste the following code.
3. Finally import it as .txt . That's it. It works for me on Windows 10.
//credit goes to blackout1000 http://www.cnet.com/forums/discussions/no-new-text-document-thru-right-mouse-click-menu-52234/
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.txt]
"Content Type"="text/plain"
@="txtfile"
"PerceivedType"="text"
[HKEY_CLASSES_ROOT\.txt\OpenWithList]
[HKEY_CLASSES_ROOT\.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\.txt\shell]
[HKEY_CLASSES_ROOT\.txt\shell\open]
[HKEY_CLASSES_ROOT\.txt\shell\open\command]
@="notepad.exe %1"
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"NullFile"=""
-
Can you also mention how can I change the Label like instead of "New Text Document" add "New Text File" ?Vicky Dev– Vicky Dev2021年10月24日 17:02:19 +00:00Commented Oct 24, 2021 at 17:02
(answer copied from https://www.tenforums.com/customization/184763-adding-notepad-right-click-new-menu.html) Working for me with Notepad++
if you just want to see an entry called "New" > "Notepad++ Document" in the context menu, then
start Notepad++ as Admin, and then go to Settings > Preferences > File Association and then select Notepad under 'Supported extensions', pick .txt and press the Right hand arrow to transfer it under 'Registered extensions'.
This will give you the context menu for New - Notepad++ Document. If you want to reverse the change, simply go through Notepad++ as Admin and move the .txt extension back to Notepad.
-
Nice one, this one fixed my issue!Yann– Yann2022年04月06日 04:38:31 +00:00Commented Apr 6, 2022 at 4:38
Same problem, but all the keys had their correct values. I just changed the value of ItemName to
C:\apps\Notepad++\notepad++.exe,-470
(That is, using the path where I have Notepad++ installed), and it worked. All my other entries are back in the "New" sub menu.
Here's the correct version:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.txt]
@="txtfile"
"Content Type"="text/plain"
"PerceivedType"="text"
[HKEY_CLASSES_ROOT\.txt\OpenWithList]
[HKEY_CLASSES_ROOT\.txt\OpenWithList\notepad.exe]
[HKEY_CLASSES_ROOT\.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"NullFile"=""
-
3This is virtually a duplicate of Theva's answer. The intention is that each answer provide a solution that is substantially different from what has already been contributed.fixer1234– fixer12342016年12月02日 18:04:02 +00:00Commented Dec 2, 2016 at 18:04
Jan's answer is the most complete and accurate, however, as user Hightower mentioned, Windows limits the number of items that can appear in the "New" right click menu.
If you already have more than a few options...remove some that are already there. As soon as I removed the options for Word, Excel and Visio documents, sure enough, the Text Document option appeared.
-
How did you remove them?Jacktose– Jacktose2018年03月08日 01:10:50 +00:00Commented Mar 8, 2018 at 1:10
i use windows10. i solved this way
- Click on HKEY_CLASSES_ROOT and look for a .txt in regedit.exe
- Find .txt
- New -> key. key name is ShellEx
enter image description here
I had the same problem and it happened after installing Notepad++. None of the mentioned solutions resolved this issue for me, however I was able to get it to work when I added the following to the Registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Notepad++_file]
@="Notepad++ Document"
[HKEY_CLASSES_ROOT\Notepad++_file\DefaultIcon]
@="\"%1\""
[HKEY_CLASSES_ROOT\Notepad++_file\shell]
@="open"
[HKEY_CLASSES_ROOT\Notepad++_file\shell\Edit]
@="&Edit"
[HKEY_CLASSES_ROOT\Notepad++_file\shell\Edit\command]
@="\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\msohtmed.exe\" %1"
[HKEY_CLASSES_ROOT\Notepad++_file\shell\open]
[HKEY_CLASSES_ROOT\Notepad++_file\shell\open\command]
@="\"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE16\\MSOXMLED.EXE\" /verb open \"%1\""
[HKEY_CLASSES_ROOT\Notepad++_file\shell\Print]
@="&Print"
[HKEY_CLASSES_ROOT\Notepad++_file\shell\Print\command]
@="\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\msohtmed.exe\" /p %1"
[HKEY_CLASSES_ROOT\Notepad++_file\ShellEx]
[HKEY_CLASSES_ROOT\Notepad++_file\ShellEx\IconHandler]
@="{42042206-2D85-11D3-8CFF-005004838597}"
Removing Unwanted Context Items That Block New Text Document Entry
As explained in some of the other answers, Windows only allows a certain number of items in the right click New menu. So even if you have the .txt registry correct (as explained in the other answers), you may not see the Text Document entry in the New menu. Here's how to delete the extra entries.
- Open Regedit.
- Click the
File->Export->All. ClickSaveto make a backup of your registry in case anything goes wrong. enter image description here - Navigate to Computer\HKEY_CLASSES_ROOT
enter image description here - Press
CTRL-Fto Search and type inShellNew. enter image description here - Press
F3or ClickFind Next. - When it stops on a "ShellNew" key, check the contents of the value
ItemName(or it may be namedcommandorFileName)
- If the path shown is not for a file type you want in the context menu, delete the corresponding "ShellNew". Don't Delete any Keys which are not named simply "ShellNew".
- Repeat 5-7 until you have deleted all the other unwanted ShellNew entries.
- Check Your Context Menu To Verify .Txt Shows UP.
- On Windows 10, you should be able to see the changes immediately, if not, try restarting the Windows shell using
Task Manager: enter image description here - Test by right clicking in a folder you have permissions too (like the
Documentsfolder). If you don't have permissions (e.g., in the root c:\ directory) you will see little if anything in theNewmenu. enter image description here
My problem was that my "New → text file" didn't show up, but I had all the registers correct.
So I had to remove some programs from the list. Apparently Windows has a limit for how many programs to show there... I removed some Microsoft Office files I didn't use on a regular basis, and that worked for me.
You must log in to answer this question.
Explore related questions
See similar questions with these tags.