有没有直接的方法来替换 Windows 11 中的 notepad.exe?

Ale*_*fie 10 windows-registry notepad notepad2 file-association windows-11

一个多星期前升级到 Win 11 后,我发现我的 Image File Execution(即HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe记事本)替代品不再起作用;我所有的文本文件都是在记事本中打开的,而不是像在 Win 10 中那样在 Notepad2 中打开。

我检查了注册表,发现 notepad.exe 的 IFE 仍然存在。但是,文本文件仍然在记事本中打开。因此,我继续检查HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\notepad.exe并用我首选的文本应用程序 Notepad2 替换了相关值。之后,notepad.exe在任何终端窗口中键入都会打开 Notepad2,但双击文本文件仍会在记事本中打开它们。

因此,我的问题是,是否有任何直接的方法可以让 notepad2.exe(或任何其他文本编辑器)替换 notepad.exe,就像早期版本的 Windows 中可能的那样?

Ale*_*fie 8

我发现卸载 Windows Store 记事本应用程序会恢复 Win10 及较早版本的行为。

  • 使用管理员 powershell 为我工作:“Remove-AppxPackage Microsoft.WindowsNotepad_10.2103.6.0_x64__8wekyb3d8bbwe”(要获取全名,请使用“Get-AppxPackage”列出软件包) (4认同)