步驟:
1、新建一個記事本,將下面的代碼復制進去,如圖所示;
@echo off
if exist “%systemroot%\notepad.exe” set Npath=“%systemroot%\notepad.exe %”1
if not exist “%systemroot%\notepad.exe” 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

2、點擊“文件--另存為”進行保存,選擇一個保存路徑,然后把文件夾修改成“文件夾.bat”的形式。如命名為“恢復記事本.bat”,將“保存類型”設置為“所有文件”,點擊“保存”,如圖:

然后找到剛保存的位置,找到并雙擊運行保存的bat文件(恢復記事本.bat)雙擊運行耐心等待命令提示符一閃而過即可完成修復!操作完成后無需重啟,我們直接在文本上單擊右鍵即可看到恢復成1個 記事本了!