批处理 判断是否安装 Visual C++ Redistributable Packages for Visual Studio
时间: 2024-04-08 08:08:13 浏览: 182
Visual C++ Redistributable Packages for Visual Studio
5星 · 资源好评率100%
你可以使用以下代码来判断是否安装了Visual C++ Redistributable Packages for Visual Studio:
```
@echo off
cls
echo Checking if Visual C++ Redistributable Packages for Visual Studio is installed...
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" >nul 2>nul
if %errorlevel% == 0 (
echo Visual C++ Redistributable Packages for Visual Studio x86 is installed
) else (
echo Visual C++ Redistributable Packages for Visual Studio x86 is not installed
)
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" >nul 2>nul
if %errorlevel% == 0 (
echo Visual C++ Redistributable Packages for Visual Studio x64 is installed
) else (
echo Visual C++ Redistributable Packages for Visual Studio x64 is not installed
)
pause
```
这个脚本会检查系统中是否安装了Visual C++ Redistributable Packages for Visual Studio x86和x64版本,并给出相应的提示。如果安装了,会输出“is installed”,否则输出“is not installed”。
阅读全文