diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-23 00:37:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-23 00:37:31 +0300 |
| commit | c9601b9396532a552679328c8f0804d52909bc84 (patch) | |
| tree | 407359aad803b3dd4fc7491f0b47656ebfb448a2 /website/install.cmd | |
| parent | db6f301f1301d85ca7a4271363760836f53ac0d0 (diff) | |
fix(windows): add local cmd installer bootstrap (#3133)
* fix(windows): add local cmd installer bootstrap
refs #2751
* fix(windows): bound installer downloads
refs #2751
Diffstat (limited to 'website/install.cmd')
| -rw-r--r-- | website/install.cmd | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/website/install.cmd b/website/install.cmd new file mode 100644 index 00000000..325e3b38 --- /dev/null +++ b/website/install.cmd @@ -0,0 +1,21 @@ +@echo off +setlocal + +set "INSTALLER_URL=https://herdr.dev/install.ps1" +set "CURL_PROTOCOL=--proto =https --tlsv1.2" +if defined HERDR_INSTALLER_URL ( + set "INSTALLER_URL=%HERDR_INSTALLER_URL%" + set "CURL_PROTOCOL=--proto =http,https" +) +set "INSTALLER_PATH=%TEMP%\herdr-install-%RANDOM%-%RANDOM%.ps1" + +curl.exe --fail --silent --show-error --location --connect-timeout 30 --speed-limit 1024 --speed-time 30 %CURL_PROTOCOL% --output "%INSTALLER_PATH%" -- "%INSTALLER_URL%" +if errorlevel 1 ( + del /f /q "%INSTALLER_PATH%" >nul 2>&1 + exit /b 1 +) + +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%INSTALLER_PATH%" %* +set "INSTALLER_EXIT=%ERRORLEVEL%" +del /f /q "%INSTALLER_PATH%" >nul 2>&1 +exit /b %INSTALLER_EXIT% |
