右鍵文字檔選「開啟方式」卻出現兩個一模一樣的「記事本」?原因是 C:\Windows\notepad.exe 與 C:\Windows\System32\notepad.exe 同時被註冊為文字檔開啟程式。執行以下批次檔,統一指向 System32 版本即可移除重複項。
@echo off
set Npath="%systemroot%\system32\notepad.exe %1"
reg add "HKCR\txtfile\shell\open\command" /ve /d %Npath% /t REG_SZ /f
reg add "HKCR\Applications\notepad.exe\shell\open\command" /ve /d %Npath% /t REG_SZ /f
reg add "HKCR\SystemFileAssociations\text\shell\open\command" /ve /d %Npath% /t REG_SZ /f
fix_notepad.bat,右鍵「以系統管理員身分執行」。


原理:將 HKCR\SystemFileAssociations\text\shell\open\command 統一指向 %systemroot%\system32\notepad.exe,消除雙重註冊。