@echo off :: Permalink: https://chse.dev/redists :: Run as Admin set "params=%*" cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B ) title Redist Installer md %temp%\Redist-Installer >nul 2>&1 :: If we have all the offline installer files, copy and skip the downloading. if exist "7za.exe" ( if exist "redists.zip" ( copy /Y 7za.exe %temp%\Redist-Installer >nul copy /Y redists.zip %temp%\Redist-Installer >nul goto offlineInstall ) ) :: If we do not have the offline installer files, download them. :onlineInstall cd %temp%\Redist-Installer echo Downloading 1/2... powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dl.chse.dev/downloadFile?id=zlc4SQ9jnLNuz8c', '7za.exe')" echo Downloading 2/2... powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dl.chse.dev/downloadFile?id=2y935FyZSVIPUZF', 'redists.zip')" :offlineInstall cd %temp%\Redist-Installer :: Extract Redists start /wait /min 7za.exe e redists.zip -y :: Install Redists echo Installing 1/16... vcredist2015_2017_2019_x86.exe /install /quiet /norestart echo Installing 2/16... vcredist2015_2017_2019_x64.exe /install /quiet /norestart echo Installing 3/16... 2013_x86.exe /install /quiet /norestart echo Installing 4/16... 2013_x64.exe /install /quiet /norestart echo Installing 5/16... 2012_x86.exe /install /quiet /norestart echo Installing 6/16... 2012_x64.exe /install /quiet /norestart echo Installing 7/16... 2010_x86.exe /install /quiet /norestart echo Installing 8/16... 2010_x64.exe /install /quiet /norestart echo Installing 9/16... 2008_x86.exe /install /quiet /norestart echo Installing 10/16... 2008_x64.exe /install /quiet /norestart echo Installing 11/16... 2005_x86.exe /Q echo Installing 12/16... 2005_x64.exe /Q echo Installing 13/16... start /wait DirectX.exe /Q echo Installing 14/16... start /wait DirectXA.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- echo Installing 15/16... start /wait dotNET.exe /Q echo Installing 16/16... :: Killfeed for Halo Custom Edition start /wait msxmlenu.msi /qn /L* "%temp%\XML Parser 4.0.log" /norestart ALLUSERS=2 >nul 2>&1 :: Cleanup cd %temp% rmdir %temp%\Redist-Installer /s /q exit