Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

匯入登錄檔快速恢復 Windows 7 右鍵「新增記事本」功能

編輯:Win7 系統基礎知識

問題現象

Windows 7 滑鼠右鍵「新增」選單中預設缺少「文字文件(記事本)」選項,導致無法快速建立純文字檔。

解決方法:匯入登錄檔

  1. 開啟記事本(Win+R → notepad)。
  2. 複製以下內容貼上:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.txt]
@="txtfile"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.txt\ShellNew]
"NullFile"=""

[HKEY_CLASSES_ROOT\txtfile]
@="文字文件"

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="NOTEPAD.EXE %1"
  1. 另存為 notepad.reg(編碼選 ANSI 或 UTF-16 LE)。
  2. 雙擊該檔案 → 「是」匯入登錄。
  3. 重新整理桌面或重啟 Explorer,右鍵「新增」即出現「文字文件」。

原理說明

  • 重建 .txt 副檔名關聯至 txtfile。
  • 在 ShellNew 加入 NullFile 空值,告訴 Shell「新增」選單顯示此項目。
  • 定義 txtfile\shell\open\command 為 NOTEPAD.EXE %1,雙擊 .txt 檔即以記事本開啟。

適用範圍

Windows 7 / 8 / 10 / 11 均適用。若系統語言為繁體中文,@="文字文件" 即為正確顯示名稱。

Copyright © Windows教程網 All Rights Reserved