[Resolved in b4] "New" in context menu doesn't have .txt

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

[Resolved in b4] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

Glad to see that the "New" context menu is back in b2. However, for some reason it shows .bmp, .rar, .zip but no .txt. On the other hand, Windows File Explorer does show .txt. I'm using Windows 10 x64 build 21337. See my screenshots here. I don't have previous Windows versions to test though, so I don't know if it is only for 21337 or not. Thank you in advance!
Last edited by jiangzhenjerry on 2021-04-02, 12:19 UTC, edited 2 times in total.
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *tuska »

Hi,
your problem does not exist in Windows 10 Pro (x64) Version 20H2 (OS build 19042.868)
(Windows with German language).
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

Thank you for testing it out for me. Then it could be a problem in 21337.

Just a guess: Starting 21337, Notepad is a Store app now (see the announcement here). Maybe this changes some default Windows registry entries.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *petermad »

2jiangzhenjerry
Notepad is a Store app now
Does that also mean that it is a Metro app, or is it still an .exe program?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

petermad wrote: 2021-03-19, 00:24 UTC 2jiangzhenjerry
Notepad is a Store app now
Does that also mean that it is a Metro app, or is it still an .exe program?
It is still an .exe program. The new path is "C:\Program Files\WindowsApps\Microsoft.WindowsNotepad_10.2102.13.0_x64__8wekyb3d8bbwe\Notepad\Notepad.exe". The old "C:\Windows\notepad.exe" still exists, but it is just a placeholder and links to the new path.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *petermad »

Hmm, what about the copy of notepad.exe that is in %SystemRoot%\System32 and in %SystemRoot%\SysWOW64 - or in other words, where is the 32-bit notepad.exe placed?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

The notepad.exe copies you referred to exist as well, but double-clicking them brings up the same new .exe I mentioned. Yes you are reading it right - double clicking %SystemRoot%\SysWOW64\notepad.exe (that's supposed to be the 32-bit notepad.exe) also brings up the 64-bit store app. So there seems to be no 32-bit notepad any more.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *ghisler(Author) »

The "New" menu is not included when I ask the system for the context menu, so I have to construct it myself. I guess that Microsoft changed how .txt files are handling new files. Could you please do the following:
1. Run regedit.exe
2. Go to the key HKEY_CLASSES_ROOT\.txt
3. Check whether there is a subkey named ShellNew.
4. If yes, click on it once to focus it, then choose menu File - Export and check to export only the selected branch
5. Post the content of the created .reg file here
Thanks!
Author of Total Commander
https://www.ghisler.com
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

Thanks for the instructions. Guess what - there is no ShellNew under HKEY_CLASSES_ROOT\.txt - I think that's the reason why .txt is not showing up on the "New" menu? Others like .bmp do have ShellNew.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *ghisler(Author) »

Maybe they moved it away? Please check what the (default) value of HKEY_CLASSES_ROOT\.txt contains. It will be something like txtfile or txt_file or similar. Then go to that key, e.g.
HKEY_CLASSES_ROOT\txtfile
and check whether it has a ShellNew entry.
Author of Total Commander
https://www.ghisler.com
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *Stefan2 »

jiangzhenjerry wrote: 2021-03-19, 08:39 UTC ...there is no ShellNew under HKEY_CLASSES_ROOT\.txt...

HKEY_CLASSES_ROOT\.txt\ShellNew
on my
Microsoft Windows [Version 10.0.18363.1441]   = 1909

Code: Select all

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

That is:
(Standard)Reg_SZ
ItemNameReg_Expand_SZ@%SystemRoot%\system32\notepad.exe,-470
NullFileReg_SZ







HKEY_CURRENT_USER\Software\Classes\.txt
has no keys or entries at my PC



HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt
als has an entry: (Standard)=txtfile
and there is a key further down: HKEY_CLASSES_ROOT\txtfile
with additional settings.


 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *ghisler(Author) »

2Stefan2
That's how it should be, the NullFile entry tells Explorer (and Total Commander) to create an empty file.

However, user jiangzhenjerry is using an insider build (some sort of preview of a future version) where Microsoft apparently removed that ShellNew key entirely, so TC cannot show the entry in the new menu...
Author of Total Commander
https://www.ghisler.com
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *jiangzhenjerry »

After digging into the registry a bit, I found that there is no 'txtfile' or 'txt_file'. There is a new key called 'txtfilelegacy', but no ShellNew under it.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *petermad »

Another fine mess made up by Microsoft :shock:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [b2 x64] "New" in context menu doesn't have .txt

Post by *ghisler(Author) »

Yes indeed. But the Explorer has to somehow know that it needs to add an entry for .txt files...
Author of Total Commander
https://www.ghisler.com
Post Reply