34

I have just upgraded to Windows 11 on my pc.

As a C++/cmake programmer, I constantly use the option "create new -> text file" on the context menu, but Windows 11 has removed this option.

Is there a way to get this option back, e.g via regedit, or some new tool?

Ian Young
  • 443
  • 1
  • 4
  • 5

6 Answers6

26

What spikey_richie suggests will reset the whole context menu back to the look from Windows 10 which might be what someone wants but does not answer the OP's specific question.

I was looking for a way to only get the "Create New Text Document"-option back. Found this great page: https://www.tenforums.com/tutorials/24412-add-remove-default-new-context-menu-items-windows-10-a.html

And used the "Restore_New_Text_Document_context_menu_item.reg"-file which worked great.

To only restore what the OP asked, the following .reg file is the only thing needed. A sign out/sign in OR reboot is needed for explorer.exe to pick up the change.

Windows Registry Editor Version 5.00

[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\txtfilelegacy]
@="Text Document"
Peregrino69
  • 4,526
  • 2
  • 22
  • 30
  • Thanks. This is the right answer for me. – Xtro Jun 03 '22 at 18:24
  • 1
    Exactly what I needed, restart explorer.exe or your pc after adding the reg files – SuperMar1o Dec 19 '22 at 14:37
  • This worked perfectly. I downloaded the registry file only for the missing New Text Document. Thanks a lot! This should be the accepted answer, as it's more specific. – Revnic Robert-Nick Mar 01 '23 at 20:27
  • 1
    I cannot seem to edit my old comment. New info: At first, this did not work. The "New -> Text Document" already appeared when right-clicking on the Desktop background, but not right-clicking within Windows Explorer. Strange enough. Both of these remain unchanged after taking this action. Then restoring my registry backup seemed to change nothing. Now, a day later, and magically (because that's how Windows works), "New -> Text Document" appears everywhere. I presume due to a reboot. I hope I can be more scientific next time. – Jason Doucette Mar 02 '23 at 04:46
  • 1
    A reboot is not required. Just open the task manager and restart the Explorer.exe process. – not_a_generic_user May 05 '23 at 18:30
7

What worked for me was resetting the Notepad app -- Settings; Apps; Apps & features; next to "Notepad", select the three dot pop-up menu; Advanced options; select Reset. It appears to effectively do an uninstall/reinstall of notepad and resets the associated settings. "Text Document" has returned as an option under the right-click, New menu.

Windows 11 settings - Apps Notepad Advanced options

Windows 11 settings - Notepad reset

You will likely need to restart Explorer for the new option to show up:

Task Manager, Explorer selected and the "Restart task" button highlighted

Peter Duniho
  • 187
  • 13
Brian Radford
  • 71
  • 1
  • 2
6

If you want to manually change the registry (always make a backup before editing) without resetting it to the Windows 10 look, here are the steps that worked for me:

  1. Open the registry editor and move to HKEY_CLASSES_ROOT\.txt
  2. Add a new Key called ShellNew
  3. Move to the new key (i.e. HKEY_CLASSES_ROOT\.txt\ShellNew)
  4. Add a new String Value with the name NullFile

Now, the only thing missing is the name shown in the context menu. Because it has none per default, the entry does not show up yet. To change this:

  1. Move to HKEY_CLASSES_ROOT\txtfilelegacy
  2. Change the (Default) value to Text File (or any other name you'd like)

Et voilà! It should show up, no reboot needed. (Edit: Maybe you do need to restart explorer.exe, as David Moylan pointed out.) If you want to add a template for the file, this might work, but I did not try it.

Iapetos
  • 61
  • 1
  • 2
  • 1
    I just tried this but the content menu didn't update. i used task manager to kill and restart explorer.exe and then it appears. obviously a machine restart would also do the same. but thanks - this was the quickest method to set this up. – David Moylan Jun 10 '22 at 03:21
5

Load up Regedit, and follow the below steps.

  1. Navigate to HKEY_CURRENT_USER\Software\Classes\CLSID
  2. Right-click the folder and select New > Key
  3. Assign the name {86ca1aa0-34aa-4e8b-a509-50c905bae2a2}
  4. Right-click the new key, and select New > Key
  5. Name it InprocServer32
  6. Edit the default string inside the InprocServer32 key, and set the data to empty/null.
  7. Reboot, and the context-menu should be available.
spikey_richie
  • 8,367
  • 2
  • 25
  • 42
  • Thanks man! Just wondering, should the value in step 6 be "empty/null"? So that the right pane says: Name: (Default) Type: REG_SZ, Data: empty/null ? Or do you mean that it should be blank? Like "" Looks like blank (https://winaero.com/how-to-enable-full-context-menus-in-windows-11/). This actually activates the "full old context menu" right? – Markus Knappen Johansson Jan 28 '22 at 00:05
  • Blank, empty, null, vacant... – spikey_richie Jan 28 '22 at 08:02
  • I already have this key as blank in my regedit. I didn't add it. It was there. As a result this answer didn't help me. Instead, running the reg file I downloaded from the link in Markus Knappen Johansson's answer fixed the problem for me. – Xtro Jun 03 '22 at 18:24
  • 5
    This does not work. I have the "New" context menu but no "New text file" in it. – Anixx Jun 17 '22 at 21:51
  • 1
    Doesn't work and does something else, it doesn't do what was asked. – Ezequiel Barbosa Aug 28 '22 at 02:36
  • The OP marked it as the correct answer, so they believe otherwise. – spikey_richie Aug 28 '22 at 19:09
  • 1
    I tried it here and it works. – Warren P Oct 02 '22 at 23:17
  • No need to modify registry. See [answer below](https://superuser.com/a/1752850/992568) – kym Nov 15 '22 at 04:35
  • This does not do what the OP asked, this is only to have the "File Explorer Context Menu" come back if it no longer appears. NOT to add a new item to the existing context menu. Also... this is supposed to be in HKEY_CLASSES_ROOT\CLSID and not HKEY_CURRENT_USER. – John C Apr 03 '23 at 15:15
  • @JohnC well, 6 people have voted it up and 1 person has marked it as the correct answer. We also have a comment from Warren to say it works, so I don't know what to tell you... – spikey_richie Apr 03 '23 at 15:17
  • @spikey_richie working and answering the question that the OP asked correctly are two different things. – John C Apr 23 '23 at 02:48
  • @johnC the op has marked it as the correct answer... So the OP thinks it answers their question. – spikey_richie Apr 23 '23 at 18:32
  • @spikey_richie again, an OP, that has no experience, marking it as an answer 6 hours after it was asked with it being the ONLY answer for 2 years does not make it correct. There are other answers on here that came 2 years after yours that ARE correct, and they even pointed out why theirs is correct over yours. And, when we point out the correctness, we are speaking to the question that is originally asked and not if it "worked" or not. On top of all that... several others even commented on stating that it didn't work... – John C Apr 28 '23 at 15:16
4

Not an answer to the question per se, but a quick work-around:

  1. New > Word Document
  2. Rename it to myfile.txt

Blank word files are just blank files, so this creates a blank file with a .txt extension, as needed.

Andrew
  • 149
  • 3
  • Should be the best answer tbh, no need to configure anything though you have to have MS Office installed. – Luke Vo Jun 15 '22 at 15:38
  • You can also select Rich Text Format, give it a different extension (.txt, .php, etc.) and then delete the one line that the file contains. RTF files are just text files with RTF tags in them. – Scott M. Stolz Oct 21 '22 at 07:37
  • Windows 11 doesn't come with Word, and there is no "Word Document" in its context menu. – David Spector Jul 29 '23 at 23:21
1

Install Windows Notepad from Microsoft Store: https://www.microsoft.com/store/productId/9MSMLRH6LZF3

Then either:

  1. Restart Windows Explorer by going to Task Manager > Processes > Windows Explorer > Right Click > Restart

  2. OR restart windows

and then it should pop up

kym
  • 129
  • 3
  • 1
    I can confirm this works even if you've already set the clumsy new context menu back to the old one. If you'd have the bright idea to install and then uninstall hoping it'll leave the desired behavior without the software, I just want to note here don't bother, it'll remove it from the context menu after uninstall. – nopara73 Jan 13 '23 at 13:53