Offline Install Option

This commit is contained in:
chase 2022-08-28 11:29:08 -05:00
parent f6ab4e0d6a
commit 81355e0357
No known key found for this signature in database
GPG Key ID: 9EC29E797878008C
4 changed files with 21 additions and 1 deletions

1
.github/release.sh vendored
View File

@ -7,3 +7,4 @@ zip -r redists.zip *
mv redists.zip ../
cd ..
rm -rf redists/
zip -r offlineInstall.zip 7za.exe 7za.dll redists.zip Redist-Installer.bat

View File

@ -24,3 +24,4 @@ jobs:
7za.dll
7za.exe
redists.zip
offlineInstall.zip

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
# Misc
*.bak
.DS_Store
redists.zip
offlineInstall.zip

View File

@ -9,8 +9,22 @@ cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) &&
title Redist Installer
md %temp%\Redist-Installer >nul 2>&1
cd %temp%\Redist-Installer
if exist "7za.dll" (
if exist "7za.exe" (
if exist "redists.zip" (
move /Y 7za.dll %temp%\Redist-Installer >nul
move /Y 7za.exe %temp%\Redist-Installer >nul
move /Y redists.zip %temp%\Redist-Installer >nul
goto offlineInstall
)
)
) else (
goto onlineInstall
)
:onlineInstall
cd %temp%\Redist-Installer
echo Downloading 1/3...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/chxseh/Redist-Installer/releases/download/latest/7za.dll', '7za.dll')"
echo Downloading 2/3...
@ -18,6 +32,8 @@ powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com
echo Downloading 3/3...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/chxseh/Redist-Installer/releases/download/latest/redists.zip', 'redists.zip')"
:offlineInstall
cd %temp%\Redist-Installer
:: Extract Redists
start /wait /min 7za.exe e redists.zip -y