vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components

VS2015卸载方法不正确,并且使用了
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
手动卸载了一些vs组件,出了问题,导致word,vs重装都出了问题(所以建议不要用这个卸载工具)。根本原因在于破坏了win的注册表,问题比较严重。

错误描述:

注册表:无法打开 XXX 由于某个错误无法打开该**
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components

vs2015重装时会报不同的错,eg:
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
点开日志文件,找问题:
搜索error,可以看到是一些msi文件安装时,注册表没有权限。

[34D8:2B98][2019-05-04T22:46:35]i301: Applying execute package: vs_minshellinterop, action: Repair, path: C:\ProgramData\Package Cache\{4443D3F4-A231-35CC-8471-CB60F8A3FE3B}v14.0.23107\packages\vs_minshellinterop\vs_minshellinterop.msi, arguments: ' MSIFASTINSTALL="7" VSEXTUI="1"'
[0B54:2128][2019-05-04T22:46:37]i000: MUX:  ExecuteError: Package (vs_minshellinterop) failed: Error Message Id: 1402 ErrorMessage: Could not open key: UNKNOWN\Components\6CE8C909E93E21E448A98CF4C80E328A\4F3D3444132ACC534817BC068F3AEFB3.   Verify that you have sufficient access to that key, or contact your support personnel.
[34D8:2B98][2019-05-04T22:46:38]e000: Error 0x80070643: Failed to run maintanance mode for MSI package.
[34D8:2B98][2019-05-04T22:46:38]e000: Error 0x80070643: Failed to execute MSI package.

因为vs修复很漫长,笨却有效的方法是逐个出错的msi修复。

方法:

eg:

C:\ProgramData\Package Cache\{4443D3F4-A231-35CC-8471-CB60F8A3FE3B}v14.0.23107\packages\vs_minshellinterop.msi

上文中此处出错,找到此目录,右键vs_minshellinterop.msi,修复
弹出key
UNKNOW\Components\C7C03442DA9C85F5C81AC7DBAC07C526\0BDE39D306B8E0647874124EF06BDD09

win+R
regedit
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\C7C03442DA9C85F5C81AC7DBAC07C526\0BDE39D306B8E0647874124EF06BDD09

修改注册表权限

vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
右键 权限
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components

高级
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
更改 所有者

vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
选择
DESKTOP-MB71SL6\Administrators

确定后
点添加
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
增加权限:
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
应用
vs2015 重装失败 修复失败 error1402 could not open key: UNKNOW\Components
确定

重复对弹出的注册表操作10余次,成功