Files
SpotX/Install.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

11 lines
619 B
Batchfile

@echo off
FOR /f %%i IN ('curl --write-out %%{http_code} --silent --output /dev/null --insecure https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1') do SET STATUS_CODE=%%i 2>nul
IF %STATUS_CODE% == 200 (
powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12}"; "& {Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/amd64fox/SpotX/main/Install.ps1' | Invoke-Expression}"
) else (
echo Can't access github.com, please check your internet connection.
echo HTTP status code %STATUS_CODE%
echo Script stopped.
)
pause
exit