redist-installer/Redist-Installer.bat

74 lines
2.4 KiB
Batchfile
Raw Normal View History

2022-04-09 00:18:32 -04:00
@echo off
2022-09-07 00:42:51 -04:00
:: Permalink: https://chse.dev/redists
2022-04-09 00:18:32 -04:00
:: 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
2022-09-07 00:42:51 -04:00
:: 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
2022-08-28 12:29:08 -04:00
)
)
2022-09-07 00:42:51 -04:00
:: If we do not have the offline installer files, download them.
2022-08-28 12:29:08 -04:00
:onlineInstall
cd %temp%\Redist-Installer
echo Downloading 1/2...
2023-04-24 06:18:21 -04:00
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dl.chse.dev/downloadFile?id=zlc4SQ9jnLNuz8c', '7za.exe')"
echo Downloading 2/2...
2023-04-24 06:18:21 -04:00
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dl.chse.dev/downloadFile?id=2y935FyZSVIPUZF', 'redists.zip')"
2022-08-28 12:29:08 -04:00
:offlineInstall
cd %temp%\Redist-Installer
:: Extract Redists
start /wait /min 7za.exe e redists.zip -y
2022-09-07 00:42:51 -04:00
:: Install Redists
echo Installing 1/16...
2022-04-09 00:18:32 -04:00
vcredist2015_2017_2019_x86.exe /install /quiet /norestart
echo Installing 2/16...
2022-04-09 00:18:32 -04:00
vcredist2015_2017_2019_x64.exe /install /quiet /norestart
echo Installing 3/16...
2022-04-09 00:18:32 -04:00
2013_x86.exe /install /quiet /norestart
echo Installing 4/16...
2022-04-09 00:18:32 -04:00
2013_x64.exe /install /quiet /norestart
echo Installing 5/16...
2022-04-09 00:18:32 -04:00
2012_x86.exe /install /quiet /norestart
echo Installing 6/16...
2022-04-09 00:18:32 -04:00
2012_x64.exe /install /quiet /norestart
echo Installing 7/16...
2022-04-09 00:18:32 -04:00
2010_x86.exe /install /quiet /norestart
echo Installing 8/16...
2022-04-09 00:18:32 -04:00
2010_x64.exe /install /quiet /norestart
echo Installing 9/16...
2022-04-09 00:18:32 -04:00
2008_x86.exe /install /quiet /norestart
echo Installing 10/16...
2022-04-09 00:18:32 -04:00
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...
2022-04-09 00:18:32 -04:00
start /wait DirectX.exe /Q
echo Installing 14/16...
2022-04-09 00:18:32 -04:00
start /wait DirectXA.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
echo Installing 15/16...
2022-04-09 00:18:32 -04:00
start /wait dotNET.exe /Q
echo Installing 16/16...
2023-04-13 11:40:33 -04:00
:: Killfeed for Halo Custom Edition
start /wait msxmlenu.msi /qn /L* "%temp%\XML Parser 4.0.log" /norestart ALLUSERS=2 >nul 2>&1
2022-04-09 00:18:32 -04:00
2022-09-07 00:42:51 -04:00
:: Cleanup
2022-04-09 00:18:32 -04:00
cd %temp%
rmdir %temp%\Redist-Installer /s /q
exit