Files
SpotX/Install_Rus.bat
amd64fox 6a71397c65 Code optimization, removing unused functions, adding exceptions.
- Removed redundant features from clearing cache and blocking updates
- Improved behavior when overwriting a patch
- Added exceptions if there is no response from the Github server
- If it was not possible to download the file, it will start the download one more time
- Code optimization and minor bug fixes
2022-01-15 18:55:46 +03:00

13 lines
720 B
Batchfile

@echo off
chcp 65001 >nul
FOR /f %%i IN ('curl --write-out %%{http_code} --silent --output /dev/null --insecure https://raw.githubusercontent.com/amd64fox/SpotX/main/Install_rus.ps1') do SET STATUS_CODE=%%i 2>nul
IF %STATUS_CODE% == 200 (
chcp 866 >nul
powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}"; "& {(Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install_rus.ps1').Content | Invoke-Expression}"
) else (
echo Нет доступа к github.com, проверьте свое интернет соединение.
echo Код ответа HTTP %STATUS_CODE%
echo Скрипт завершен.
)
pause
exit