Windows 10/11 現代介面(推薦)
- 設定 (Win+I) → 應用程式 → 預設應用程式
- 搜尋或捲動找到目標瀏覽器 (Chrome/Edge/Firefox/Brave/Vivaldi...)
- 點選該瀏覽器 → 「設為預設」按鈕 (Win 11) 或逐一關聯 .htm/.html/HTTP/HTTPS (Win 10)
- Win 11 22H2+:直接出現「設為預設瀏覽器」一鍵按鈕
傳統控制台介面(Win 7/8/10 相容)
- 控制台 → 程式 → 預設程式 → 設定預設程式
- 左側選擇目標瀏覽器 → 「將這個程式設為預設」或「選擇這個程式開啟的預設值」
- 勾選 .htm .html .shtml .xht .xhtml HTTP HTTPS FTP 等協定/副檔名 → 儲存
命令列/腳本自動化(企業部署/重灌腳本)
PowerShell (Win 10 1803+)
# 設定 Chrome 為預設 (需確認 ProgId)
$browser = "ChromeHTML" # Chrome/Edge/Brave/Vivaldi 共用
# 或 "FirefoxURL-308046B0AF4A39CB" (Firefox ProgId 會變)
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice" -Name ProgId -Value $browser
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice" -Name ProgId -Value $browser
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\Shell\Associations\FileAssociations\.htm\UserChoice" -Name ProgId -Value $browser
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\Shell\Associations\FileAssociations\.html\UserChoice" -Name ProgId -Value $browser
# 需重啟 Explorer 生效
Stop-Process -Name explorer -Force
DISM/群組原則 (企業版)
# 匯出關聯檔
dism /online /export-defaultappassociations:default.xml
# 修改 XML 中 http/https/htm/html 對應 ProgId
# 導入
dism /online /import-defaultappassociations:default.xml
瀏覽器內建一鍵設定
- Chrome:設定 → 預設瀏覽器 → 「設為預設」
- Edge:設定 → 預設瀏覽器 → 「設為預設」
- Firefox:設定 → 一般 → 啟動 → 「設為預設瀏覽器」
- Brave/Vivaldi/Opera:同樣在設定首頁提供一鍵按鈕
常見問題
| 問題 | 原因 | 解決 |
| 設定後開啟連結仍用 Edge | Edge 系統級攔截 (Win 11 Widget/搜尋/郵件) | Edge 設定 → 預設瀏覽器 → 關閉「以 Microsoft Edge 開啟連結」/ 使用 EdgeDeflector/MSEdgeRedirect |
| 系統設定頁面無反應/閃退 | 系統元件損毀 | sfc /scannow + DISM /RestoreHealth |
| Firefox ProgId 每次更新都變 | Firefox 設計機制 | 用「設為預設瀏覽器」按鈕、或腳本動態抓取 ProgId |
多瀏覽器共存策略
- 主力瀏覽器設為預設
- 特定用途用捷徑參數指定:
"C:\Program Files\Firefox\firefox.exe" -new-window "https://example.com"
- 瀏覽器選擇器工具:
BrowserSelector、OpenWith 讓每個連結彈出選單選擇