vc2019 runtime 无法安装的神奇错误

本文介绍了一种特殊的注册表权限问题,导致安装Microsoft Visual C++ 2019时出现Error 1402错误。通过使用PsExec工具以SystemAccount权限运行注册表编辑器,可以修改相关注册表项的权限,进而解决此问题。

报错:

Product: Microsoft Visual C++ 2019 X86 Minimum Runtime - 14.28.29334 -- Error 1402. Could not open key: UNKNOWN\Components\8F139CF91DE936230A1FA8ED33D0E0EC\218A10D01A28F1845864E8829E678FFD.  System error 5.  Verify that you have sufficient access to that key, or contact your support personnel.

原因是注册表权限问题,即使用管理员执行注册表编辑器也不行,非常的神奇。

解决办法,用 System Account 执行注册表编辑器,具体步骤 参考 :



Install Error 1402 (Could not open key: UNKNOWN\Components) [McNeel Wiki]

  1. Download PsExec from Microsoft TechNet, and extract the contents to your desktop.

  2. Open a Windows command shell.

  3. Change directories to your desktop.

  4. In the command shell, enter psexec -i -d -s c:\windows\regedit.exe. This causes Windows to run the registry editor with the permissions of the System account – an account even more powerful than Administrator.

  5. Browse to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\

  6. Right-click the UserData folder, then click Permissions…

  7. In the Permissions for UserData dialog box, click Advanced.

  8. Be sure that Administrators has Full Control permissions in this folder, and that Users has Read permissions. There will be other user permissions, too, but Administrators and Users are what matter most.

  9. Select the Replace all child object permissions with inheritable permissions from this object.

  10. Click OK twice to apply permissions.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值