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

Win10 預設瀏覽器被竄改?透過登錄編輯器手動恢復預設關聯完整步驟

編輯:Windows 10 系統介紹

Windows 10 預設瀏覽器關聯常因第三方軟體安裝、系統更新或惡意程式被竄改,導致點擊連結、開啟 HTML 檔案時跳出非預期瀏覽器。雖可在「設定 → 應用程式 → 預設應用程式」重新指定,但若介面操作無效,透過登錄編輯器(Registry Editor)直接修復 .htm/.html 檔案關聯是最徹底的解法。

快速恢復步驟(登錄編輯器法)

  1. 按 Win+R → 輸入 regedit → Enter 開啟登錄編輯器。
    執行 regedit
  2. 定位至使用者層級檔案關聯鍵值:
    HKEY_CURRENT_USER\Software\Classes
  3. 依序展開 .htm 與 .html 子鍵,查看 (預設) 字串值資料。
    htm/html 子鍵
  4. 若資料非 htmlfile(例如 FirefoxHTML、ChromeHTML、EdgeHTML 等),雙擊修改為 htmlfile。
    修改為 htmlfile
  5. 同樣檢查 HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice 及 https 子鍵的 ProgId 值,若非 AppX...MicrosoftEdge 或預期瀏覽器 ProgId,可刪除該 UserChoice 鍵值,讓系統重新詢問或套用「預設應用程式」設定。
  6. 登出/重新登入或重啟 explorer.exe 即可生效。

為什麼改 htmlfile 即可恢復系統預設?

  • htmlfile 是 Windows 內建的 ProgID,對應系統預設的 HTML 檔案處理器(早期為 IE,Win10 1709 後為 Edge/EdgeHTML,新版 Edge Chromium 則為 AppX...MicrosoftEdge)。
  • 修改為 htmlfile 等於告訴系統:「請用目前設定的預設瀏覽器開啟」,而非綁定特定瀏覽器的 ProgID。

輔助方案:透過「預設應用程式」介面重置

  1. 設定 → 應用程式 → 預設應用程式 → 網頁瀏覽器 → 選擇想要的瀏覽器。
  2. 向下捲動至「依副檔名選擇預設應用程式」 → 找到 .htm、.html、.shtml、.xht、.xhtml → 全部設為同一瀏覽器。
  3. 若介面無反應,嘗試「重置為 Microsoft 針對的預設值」按鈕,再重新指定。

防止再次被竄改的建議

  • 安裝新軟體時選擇「自訂安裝」,取消勾選「設為預設瀏覽器」、「修改檔案關聯」等選項。
  • 使用 EdgeDeflector、BrowserSelector 等工具攔截系統層級的瀏覽器啟動請求,強制導向指定瀏覽器。
  • 定期掃描惡意軟體(Windows Defender / Malwarebytes),部分廣告軟體會持續修改登錄關聯。
  • 企業環境可透過群組原則 Computer Configuration → Administrative Templates → Windows Components → File Explorer → Set a default associations configuration file 鎖定關聯設定。

快速驗證指令(PowerShell)

# 查詢目前 .html 關聯
Get-ItemProperty 'HKCU:\Software\Classes\.html' | Select-Object -ExpandProperty '(default)'

# 查詢 http/https 協定關聯
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice' | Select-Object ProgId
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice' | Select-Object ProgId

掌握登錄修復技巧,下次預設瀏覽器被竄改時即可在一分鐘內精準修復,無需重裝瀏覽器或重置系統。

Copyright © Windows教程網 All Rights Reserved