[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

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

Post by *jiangzhenjerry »

Well, I think it's beyond my limited knowledge of Windows registry to know where to find the needed info related to .txt. So I'm uploading %SystemRoot%\system32\config\SOFTWARE (that is,HKLM\SOFTWARE) here. This file is directly from my fresh brewed 21337.1010.210315 ISO/wim, without personal alterations. Anyone interested can mount it as a hive and explore a bit, and \SOFTWARE\Classes should contain most default information for HKCR.
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

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

Post by *jiangzhenjerry »

Thank you for releasing b3 today. In the release note, I noticed that this issue was said to have been resolved by "always add[ing] an entry for .txt files on Windows 10." However, I still don't see the .txt entry :roll:
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post by *Horst.Epp »

jiangzhenjerry wrote: 2021-03-25, 18:52 UTC Thank you for releasing b3 today. In the release note, I noticed that this issue was said to have been resolved by "always add[ing] an entry for .txt files on Windows 10." However, I still don't see the .txt entry :roll:
Here I see it
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

Horst.Epp wrote: 2021-03-25, 18:54 UTC
jiangzhenjerry wrote: 2021-03-25, 18:52 UTC Thank you for releasing b3 today.
In the release note, I noticed that this issue was said to have been resolved by "always add[ing] an entry for .txt files on Windows 10."
However, I still don't see the .txt entry :roll:
Here I see it
Windows 10 21337 (developer preview)
HISTORY.TXT wrote:25.03.21 Release Total Commander 10.00 public beta 3
24.03.21 Fixed: Bug in Windows 10 21337 (developer preview), there is no more HKEY_CLASSES_ROOT\.txt\ShellNew key,
         but the Explorer still shows an entry in the "New" context menu.
         Solution: Always add an entry for .txt files on Windows 10 (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

I don't have this Windows 10 version, so I simulated it by renaming the ShellNew key to ShellNewMissing. Maybe other keys are also missing under .txt. I will have to look at your registry dump again. :(
Author of Total Commander
https://www.ghisler.com
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

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

Post by *Horst.Epp »

tuska wrote: 2021-03-25, 19:50 UTC
Horst.Epp wrote: 2021-03-25, 18:54 UTC
jiangzhenjerry wrote: 2021-03-25, 18:52 UTC Thank you for releasing b3 today.
In the release note, I noticed that this issue was said to have been resolved by "always add[ing] an entry for .txt files on Windows 10."
However, I still don't see the .txt entry :roll:
Here I see it
Windows 10 21337 (developer preview)
HISTORY.TXT wrote:25.03.21 Release Total Commander 10.00 public beta 3
24.03.21 Fixed: Bug in Windows 10 21337 (developer preview), there is no more HKEY_CLASSES_ROOT\.txt\ShellNew key,
         but the Explorer still shows an entry in the "New" context menu.
         Solution: Always add an entry for .txt files on Windows 10 (32/64)
Even in my Windows version I had not the *.txt entry (only Rich text)
and now I have the entry. I never use any New entries.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

It should be added as long as there is a HKEY_CLASSES_ROOT\.txt registry key which has a (default) value set.
Author of Total Commander
https://www.ghisler.com
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

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

Post by *jiangzhenjerry »

ghisler(Author) wrote: 2021-03-26, 07:58 UTC I don't have this Windows 10 version, so I simulated it by renaming the ShellNew key to ShellNewMissing. Maybe other keys are also missing under .txt. I will have to look at your registry dump again. :(
Thank you very much for your patience and continuous support. Really appreciated.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

The problem is that the key to which the (default) value of .key points:
[HKEY_CLASSES_ROOT\txtfilelegacy]
does not have a (default) value set. This is used as the text for the "New" menu entry. I will try to use an alternative with a self translated string.
Author of Total Commander
https://www.ghisler.com
siealex
Senior Member
Senior Member
Posts: 278
Joined: 2009-03-22, 16:36 UTC

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

Post by *siealex »

Install a third-party editor (e. g. Notepad++) and associate .txt with it. Does this solve the issue?
We are not so S.M.A.R.T. as we imagine...
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

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

Post by *jiangzhenjerry »

@siealex: Yes - Associating .txt with Notepad++ does bring up the New menu item in TC. Thank you for the suggestion.

Interestingly, the action of file association doesn't change the (default) value for txtfilelegacy, which ghisler referred to. It only adds an entry to ".txt" and "txtfilelegacy\shell\printto". See the registry below. I have no clue why now TC recognizes .txt :shock:

Another minor difference I notice is that, in File Explorer the entry shows as "Text Document", while in TC it shows as "Notepad++ Document (.txt)". I'm not saying it is an issue - I just feel it may indicate that File Explorer and TC are pulling information from different places.

Code: Select all

[HKEY_CLASSES_ROOT\.txt]
@="Notepad++_file"
"Content Type"="text/plain"
"Notepad++_backup"="txtfilelegacy"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\.txt\OpenWithProgids]
"AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw"=hex(0):

[HKEY_CLASSES_ROOT\.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

Code: Select all

[HKEY_CLASSES_ROOT\txtfilelegacy]

[HKEY_CLASSES_ROOT\txtfilelegacy\shell]

[HKEY_CLASSES_ROOT\txtfilelegacy\shell\printto]
"NeverDefault"=""

[HKEY_CLASSES_ROOT\txtfilelegacy\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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

Interestingly, the action of file association doesn't change the (default) value for txtfilelegacy
That's because the default value of HKEY_CLASSES_ROOT\.txt now points to somewhere else:
@="Notepad++_file"

If you look in HKEY_CLASSES_ROOT\Notepad++_file you will see that it does have a default value.
Author of Total Commander
https://www.ghisler.com
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

HISTORY.TXT wrote:01.04.21 Release Total Commander 10.00 public beta 4
26.03.21 Fixed: Still no entry for .txt files in Context menu-New submenu on Windows 10 21337 (developer preview),
              because the key HKEY_CLASSES_ROOT\txtfilelegacy was missing a (default) value = description (32/64)
jiangzhenjerry
Junior Member
Junior Member
Posts: 58
Joined: 2016-01-15, 23:57 UTC

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

Post by *jiangzhenjerry »

@ghisler: Thank you very much for your explanation and a lot of efforts. I confirm that this issue is resolved in beta 4. I tried b4 on build 21337 and also a fresh install of build 21343, and it works for both builds. :D
Post Reply