@echo off
CD /d %~dp0

echo.
echo Microsoft Visual C++ All-In-One Runtimes by W1zzard @ TechPowerUp
echo https://www.techpowerup.com/download/visual-c-redistributable-runtime-package-all-in-one/
echo.
echo Installing runtime packages...

set IS_X64=0 && if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set IS_X64=1) else (if "%PROCESSOR_ARCHITEW6432%"=="AMD64" (set IS_X64=1))

if "%IS_X64%" == "1" goto X64

echo Install Visual C++ Redistributable Runtime 2015 - 2022...
start /wait %~dp0vcredist2015_2017_2019_2022_x86.exe /passive /norestart

echo Install Crystal Report Runtime ...
msiexec /i %~dp0CR13SP33MSI32_0-80007712.MSI

goto END

:X64

echo Install Visual C++ Redistributable Runtime 2015 - 2022...
start /wait %~dp0vcredist2015_2017_2019_2022_x86.exe /passive /norestart
start /wait %~dp0vcredist2015_2017_2019_2022_x64.exe /passive /norestart

echo Install Crystal Report Runtime ...
msiexec /i %~dp0CR13SP33MSI64_0-80007712.MSI

goto END

:END

echo.
echo Installation completed successfully

exit