Visual Studio 2005 SP1 1718 错误

本文介绍了解决VisualStudio2005ServicePack1安装过程中出现错误1718的方法。错误1718通常发生在WindowsServer2003系统上,并且在加入ActiveDirectory域的情况下更易发生。文章提供了详细的步骤来修改注册表设置以绕过此问题,并附带了一个批处理脚本来自动化整个过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

When installing Visual Studio 2005 Service Pack 1, you may see an error like the following (file name will vary):

Error 1718.File D:/WINDOWS/Installer/50baad.msp was rejected by digital signature policy.

Knowledge Base article 925336 had originally documented instructions using the Local Security Policy UI to work around this issue based on my previous blog post. While both Windows XP and Windows Server 2003 are theoretically susceptible to this issue, to date it's only been observed on Windows Server 2003 – particularly on machines in an Active Directory domain.

Investigations showed that when there's a conflict with domain policy, the UI instructions I documented won't set the registry value that SAFER – the software restriction policy API introduced in Windows XP – uses to determine whether to validate all files.

To reliably workaround this issue, you should follow the instructions below. It is highly recommended that you remove your machine from any domain while installing Visual Studio 2005 Service Pack 1 if you've encountered this problem. Otherwise a domain policy refresh could override the registry value during installation and block the installation.

  1. Leave your domain if belong to a domain and reboot
  2. Set the DWORD registry value PolicyScope to 1 in the HKEY_LOCAL_MACHINE/SOFTWARE/Policies/Microsoft/Windows/Safer/CodeIdentifiers registry key
  3. From an elevated command prompt, run "net stop msiserver" (without quotes) or simply reboot your machine
  4. Install the patch
  5. Reset the registry value from step 2
  6. Re-join your domain if you previously belonged to a domain and reboot

This can be automated rather easily, as shown in the following batch script example.

rem It is recommended you leave a domain and reboot before running this script

rem Backup the registry key before changing it to save the current values
reg export HKLM/SOFTWARE/Policies/Microsoft/Windows/Safer/CodeIdentifiers "%TMP%/safer.reg" /y

rem Set the new value and stop Windows Installer, which will automatically restart when the patch gets installed
reg add HKLM/SOFTWARE/Policies/Microsoft/Windows/Safer/CodeIdentifiers /v PolicyScope /t REG_DWORD /d 1 /f
net stop msiserver

rem Replace the name of the patch below according to which patch you downloaded
rem This exmple silently installs the patch with verbose logging enabled
start /wait VS80sp1-KB926601-X86-ENU.exe /L*v+ "%TMP%/VS80sp1-KB926601-X86-ENU.log" /quiet

rem Delete the new value and restore previous registry values for SAFER
reg delete HKLM/SOFTWARE/Policies/Microsoft/Windows/Safer/CodeIdentifiers /v PolicyScope /f
reg import "%TMP%/safer.reg"

 

 

转载,原文地址:

http://blogs.msdn.com/heaths/archive/2007/01/11/workaround-for-error-1718.aspx

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值