Windows 11: Restore 'New Test Document' to context menu

Sometime in March 2023, the option to create a new text document disappeared from the Windows 11 context menu (Right Click Menu). Here's one way to replace it that I know works as of 2023/04/06.

(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