Open rka-ppi opened 5 months ago
Hi @rka-ppi
I have done a quick test on a Windows 11 machine and I have the new notepad launched. What the Hosts File Editor is doing here is retrieving from the registry the default command associated to the action of edit a text file. Can you open a PowerShell, execute the command below and post the output?
Get-Item -Path Registry::HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
/needinfo
EDIT: and of course! In case of error we fallback to the good old notepad.exe
.
Log file should contain more informations. Can you also reproduce the issue and attach the log file from the following folder %LOCALAPPDATA%\Microsoft\PowerToys\Hosts\Logs\0.81.1.0
?
retrieving from the registry the default command associated to the action of edit a text file.
@davidegiacometti why not just use (some kind of) ShellExecute command?
Get-Item -Path Registry::HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
Hive: HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit
Name Property
---- --------
command (default) : C:\WINDOWS\system32\NOTEPAD.EXE %1
Well.... Then it's a bug in the Win11 notepad App update mechanism. Strange.
@davidegiacometti why not just use (some kind of) ShellExecute command?
This won't work since the hosts file doesn't have an extension.
Get-Item -Path Registry::HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command Hive: HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit Name Property ---- -------- command (default) : C:\WINDOWS\system32\NOTEPAD.EXE %1
Well.... Then it's a bug in the Win11 notepad App update mechanism. Strange.
Woow! Can you confirm that C:\WINDOWS\system32\NOTEPAD.EXE
is opening the old notepad on your PC?
Yes... C:\WINDOWS\system32\NOTEPAD.EXE
will open the old one.
Taskbar and Explorer Actions will open C:\Program Files\WindowsApps\Microsoft.WindowsNotepad_11.2404.10.0_x64__8wekyb3d8bbwe\Notepad
Can you confirm that if you right click a txt file in Explorer and click "Edit" it opens the old notepad? That's what the editor is doing.
Yes I can confirm. Edit bring up the "new" notepad
ok well, there are two entrys.
new Win11 menu: Explorer -> edit in editor brings the new one old Win11 menu: Explorer -> further options -> edit bring the old one
Microsoft PowerToys version
0.81.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Hosts File Editor
Steps to reproduce
✔️ Expected Behavior
Should use the actual notepad verson
❌ Actual Behavior
An old outdated notepad-version appears
Other Software
Edition Windows 11 Enterprise Version 23H2 Betriebssystembuild 22631.3593