一键修复dll问题

@echo off
cls

echo Visual C++ Redistributable Installer
echo ===================================
echo Fixes MSVCP140_2.dll missing error
echo ===================================

:: Check system architecture
set ARCH=x86
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set ARCH=x64
if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set ARCH=x64

echo System: %ARCH%
echo. 

:: Set download paths
set TEMP_DIR=%TEMP%

:: Download and install for 64-bit
if "%ARCH%"=="x64" (
echo Step 1: Downloading Visual C++ x64...
powershell -Command "Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vc_redist.x64.exe' -OutFile '%TEMP_DIR%\vc_x64.exe'"

echo Step 2: Installing Visual C++ x64...
if exist "%TEMP_DIR%\vc_x64.exe" (
"%TEMP_DIR%\vc_x64.exe" /quiet /norestart
echo x64 installed successfully
) else (
echo x64 download failed
)

echo.
echo Step 3: Downloading Visual C++ x86 (compatibility)...
powershell -Command "Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vc_redist.x86.exe' -OutFile '%TEMP_DIR%\vc_x86.exe'"

echo Step 4: Installing Visual C++ x86...
if exist "%TEMP_DIR%\vc_x86.exe" (
"%TEMP_DIR%\vc_x86.exe" /quiet /norestart
echo x86 installed successfully
) else (
echo x86 download failed
)
) else (
echo Step 1: Downloading Visual C++ x86...
powershell -Command "Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vc_redist.x86.exe' -OutFile '%TEMP_DIR%\vc_x86.exe'"

echo Step 2: Installing Visual C++ x86...
if exist "%TEMP_DIR%\vc_x86.exe" (
"%TEMP_DIR%\vc_x86.exe" /quiet /norestart
echo x86 installed successfully
) else (
echo x86 download failed
)
)

echo.
echo Step 5: Cleaning up...
if exist "%TEMP_DIR%\vc_x64.exe" del "%TEMP_DIR%\vc_x64.exe"
if exist "%TEMP_DIR%\vc_x86.exe" del "%TEMP_DIR%\vc_x86.exe"

echo.
echo ===================================
echo Installation Complete!
echo ===================================
echo Visual C++ Redistributable installed
echo This should fix MSVCP140_2.dll error
echo.
echo Please restart your computer
echo ===================================

echo Press any key to exit...
pause >nul

如果这个不行就下载安装虫虫编辑器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

西城男孩(0t0)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值