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

Win10 PowerShell 重設應用程式失效?DISM 修復映像 /ScanHealth + /RestoreHealth 替代方案

編輯:Win10 系統應用技巧

Win10 內建 PowerShell 指令 Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} 可重註冊 UWP 應用修復商店/開始選單異常,但有時會失效(報錯、卡住、無反應)。此時可改用 DISM 修復系統映像 達到同樣效果。

PowerShell 重設失效示意

DISM 修復指令(依序執行,順序不可換)

  1. 以管理員權限開啟命令提示字元(或 PowerShell)
  2. 執行掃描健康情況:
dism /online /cleanup-image /scanhealth
  1. 完成後執行修復健康情況:
dism /online /cleanup-image /restorehealth

⚠ 必須先跑 scanhealth 再跑 restorehealth,中間不可重開機,需等待上一條指令完全結束。

原理說明

  • /scanhealth:檢查元件存放區是否損毀
  • /restorehealth:自動從 Windows Update 下載健康檔案替換損毀元件,間接修復 UWP 應用註冊依賴的系統元件

適用場景

  • PowerShell 重註冊指令報錯 0x80073CF9、0x80070005 等
  • Microsoft Store、照片、計算機等內建應用無法啟動/閃退
  • 開始選單、搜尋、通知中心異常

進階:指定修復來源(離線環境)

若無網路或 WU 損毀,可掛載 Win10 安裝映像 (install.wim) 指定來源:

dism /online /cleanup-image /restorehealth /source:wim:D:\sources\install.wim:1 /limitaccess

(D 為安裝媒體磁碟機,:1 為映像索引號,可用 dism /get-wiminfo /wimfile:D:\sources\install.wim 查詢)

建議流程

  1. 先試 PowerShell 重註冊(輕量、快速)
  2. 失效再上 DISM 修復映像(較重但成功率高)
  3. 仍失效考慮 sfc /scannow 或就地升級修復
Copyright © Windows教程網 All Rights Reserved