@echo off REM Netrinos Client Installer - Downloads and installs Netrinos for Windows REM REM Usage: REM install-client.bat [version] REM REM or directly from cmd.exe with: REM REM curl -L https://dist.netrinos.com/windows/install-client.bat | cmd REM REM Version can be: daily, beta, latest (default) REM REM Examples: REM install-client.bat daily REM install-client.bat latest REM Get version from command line argument, default to latest set "version=%~1" if "%version%"=="" set "version=latest" REM Convert to lowercase for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set "version=%%version:%%i=%%i%%" REM Define base URL set "base_url=https://dist.netrinos.com/windows" REM Set folder based on version if /i "%version%"=="daily" ( set "base_url=%base_url%/daily" ) else if /i "%version%"=="beta" ( set "base_url=%base_url%/beta" ) else if /i "%version%"=="latest" ( REM latest is in main folder ) else ( set "base_url=%base_url%/archive" ) REM Define filename set "filename=NetrinosInstaller-Windows_%version%.exe" REM Define URL set "url=%base_url%/%filename%" echo Using: %url% REM Define temporary file set "tmpfile=%TEMP%\NetrinosInstaller.exe" REM Download the installer echo Downloading Netrinos %version% build... curl -L --progress-bar -o "%tmpfile%" "%url%" if %errorlevel% neq 0 ( echo Download failed! exit /b 1 ) REM Install silently echo Installing Netrinos... "%tmpfile%" /VERYSILENT /NORESTART /SUPPRESSMSGBOXES if %errorlevel% equ 0 ( del "%tmpfile%" 2>nul REM Set upgrade channel preference if exist "%ProgramFiles%\Netrinos\Netrinos.exe" ( echo Setting upgrade channel to: %version% "%ProgramFiles%\Netrinos\Netrinos.exe" upgrade channel "%version%" >nul 2>&1 ) echo Installation complete! ) else ( echo Installation failed! exit /b %errorlevel% )