当我尝试卸载 Visual Studio 2015 社区版时,我首先在控制面板 > 程序和功能中尝试以这种方式卸载它。
然后找到以下链接:
force uninstall a visual studio 2015 preview or release candidate
然后导航到C:\ProgramData 并输入:
dir /s vs_community.exe
它生成了这个有用的路径信息:
C:\ProgramData\Package Cache\{50b32652-69d2-4b93-9316-edcd12067b8b}
然后使用 Windows 资源管理器转到该文件夹,Shift + Right Click > Open command window here 并运行:
vs_community.exe /uninstall /force
我在很长一段时间后得到了这个错误屏幕...
然后看到下面的问题:
removing visual studio components left behind after an uninstall
所以我尝试运行:
vs_community.exe /repair
它最终挂起,大约半小时后我强行退出它。然后我跑了:
vs_community.exe /uninstall /force
这次我检查了错误日志,发现下面一行非常接近底部。
Applying execute package: Windows7_MSU_x64, action: Uninstall, path: 2999226, arguments: '"C:\windows\SysNative\wusa.exe" /uninstall /kb:2999226 /quiet /norestart'
由于出现错误,我以为我必须安装 KB2999226 更新:
Update for Microsoft Windows (KB2999226) : The storage control blocks were destroyed.
所以我安装了它,但vs_community.exe 仍然不会强制卸载。我可能已经安装了更新,但是因为我的windowsupdate.log 文件只能追溯到一个月左右,所以我找不到?无论如何,我安装更新可能没有改变任何东西。
根据以下文章:
sysnative folder 64 bit windows
File System Redirector - MSDN
Windows7_MSU_x64 试图访问 C:\Windows\System32 文件夹,但因为我有 64 位版本的 Windows 7,它试图访问 C:\windows\SysNative 文件夹,因为它是自动重定向到真正的System32 文件夹。由于某种原因,我没有SysNative 文件夹,所以...
然后我去了 Windows Update 并卸载了 KB2999226 更新并返回:
C:\ProgramData\Package Cache\{50b32652-69d2-4b93-9316-edcd12067b8b}
再次运行以下命令:
vs_community.exe /uninstall /force
这次成功了,我得到了屏幕: