Error 1402. Could not open key:

来源:互联网 发布:永恒之塔5.0人物数据 编辑:程序博客网 时间:2024/06/16 16:52

安装VS2013和卸载VS2015的时候都遇到这个问题了,记录下来

OS: windows 7 

develop tool: visual studio 2013 with update 5

error: Error 1402. Could not open key: 

参考这里的方法解决的:


操作步骤:

1, 下载 SubInACL tool 安装到默认目录(下载地址)

默认安装完成后,在“C:\Program Files (x86)\Windows Resource Kits\Tools“目录下可以找到“subinacl.exe”

2,在C:\Program Files (x86)\Windows Resource Kits\Tools“目录下新建一个记事本文件,把下边内容拷贝进去,文件命名"reset.cmd"

echo. echo Resetting ACLs…echo (this may take several minutes to complete)echo. echo IMPORTANT NOTE: For this script to run correctly, you must changeecho the values named YOURUSERNAME to be the Windows user account thatecho you are logged in with.echo.echo ==========================================================================echo. echo. subinacl.exe /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /setowner=administrators > %temp%\subinacl_output.txtecho. echo. subinacl.exe /keyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /setowner=administrators >> %temp%\subinacl_output.txtecho. echo. subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r /setowner=administrators >> %temp%\subinacl_output.txtecho. echo. subinacl.exe /keyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r /setowner=administrators >> %temp%\subinacl_output.txtecho. echo. subinacl.exe /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators >> %temp%\subinacl_output.txtecho. echo. subinacl.exe /keyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators >> %temp%\subinacl_output.txtecho.echo. echo System Drive…subinacl.exe /subdirectories %ProgramFilesPath%\ /grant=administrators=f /grant=system=f /grant=users=e >> %temp%\subinacl_output.txtecho. echo. echo Windows Directory…subinacl.exe /subdirectories %windir%\ /grant=administrators=f /grant=system=f /grant=users=e >> %temp%\subinacl_output.txtecho. echo. echo ==========================================================================echo. echo FINISHED.echo. echo Press any key to exit . . .pause >NULpopd:END
3,以管理员方式打开命令行并切换到“C:\Program Files (x86)\Windows Resource Kits\Tools”目录下,执行reset.cmd文件


遇到错误处理的办法可以参考原文


References:

1,Solving setup errors by using the SubInACL tool to repair file and registry permissions


0 0
原创粉丝点击