執行 MSI 安裝包/Windows Update 時出現 `msiexec.exe - 損壞的映像`、DLL 載入失敗,主因 `msiexec.exe` 系統檔損毀或相依 DLL (`msi.dll`, `msihnd.dll`) 版本不符。若暫不需安裝 MSI 套件,可停用 Windows Installer 服務規避錯誤。
暫時規避:停用 Windows Installer 服務
- Win+R → `services.msc`
- 找到 Windows Installer → 雙擊 →「啟動類型」改為 「已停用」 → 「停止」服務 → 確定。
- 或命令列 (管理員):
`sc config msiserver start= disabled`
`sc stop msiserver`
✅ 停用後:`msiexec.exe` 不會自動啟動,安裝 MSI/更新時會報錯「Windows Installer 服務無法存取」,但系統其餘功能正常運行。
根治修復 (建議)
- 系統檔案修復:管理員命令提示字元執行 `sfc /scannow` 完成後重開機。
- 重新註冊 Windows Installer:
`msiexec /unregister`
`msiexec /regserver`
重開機。
- 修復/重新安裝 Windows Installer 4.5/5.0:
下載官方 `WindowsInstaller-KB942288-v3-x86.exe` (Win7 適用) 重新安裝。
- 檢查磁碟錯誤:`chkdsk C: /f /r` 重開機掃描修復壞軌。
何時需啟用 Windows Installer
- 安裝/更新任何 `.msi` 封裝軟體 (Office、Visual Studio、驅動程式、企業級應用)。
- Windows Update 安裝部分安全性更新 (以 MSI 封裝)。
- 使用 `msiexec /i package.msi` 手動安裝。
⚠️ 長期停用會導致系統無法安裝關鍵更新、軟體安裝失效,修復完成後請改回「手動」啟動類型。