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

Windows Server 2003 安裝 VS2005 SP1 錯誤 1718 完美解決方案

編輯:Windows Server 常見問題解答

錯誤現象

安裝 Visual Studio 2005 SP1 時彈出:Error 1718. File was rejected by digital signature policy — 數位簽章被本機軟體限制原則拒絕。

根因分析

Windows Server 2003 預設啟用「軟體限制原則」並設為「所有使用者 (含管理員)」強制執行,導致安裝程式的簽章驗證失敗。

解決方案一:調整軟體限制原則 (立即生效)

  1. Win+R → control admintools → 「本機安全性原則」。
  2. 展開「軟體限制原則」→ 若無項目,右鍵「新增軟體限制原則」。
  3. 右鍵「強制執行」→ 內容 → 選擇 「除本機管理員以外的所有使用者」。
  4. 確定並 重新啟動伺服器。

原理:管理員安裝軟體時繞過簽章強制驗證,SP1 順利安裝。

解決方案二:加速 SP1 安裝 (解決「裝半天」痛點)

原因:Windows Installer 快取機制 (MaxPatchCacheSize) 導致大型修補程式掃描極慢。

建立批次檔 sp_install.bat 與 SP1 安裝檔放同目錄:

@echo off
reg export HKLM\Software\Policies\Microsoft\Windows\Installer installer.reg
reg add HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /t REG_DWORD /d 0 /f
net stop msiserver
start /wait VS80sp1-KB926604-X86-CHS.exe   :: 依實際檔名修改
reg delete HKLM\Software\Policies\Microsoft\Windows\Installer /v MaxPatchCacheSize /f
reg import installer.reg
net stop msiserver
del /q installer.reg 2>nul

關鍵參數:MaxPatchCacheSize=0 臨時禁用修補程式快取,安裝完成後自動還原原設定。

驗證

執行批次檔,SP1 安裝速度顯著提升 (通常從 30-60 分鐘縮減至 5-10 分鐘),且無 1718 錯誤。

Copyright © Windows教程網 All Rights Reserved