@echo off setlocal EnableExtensions title ZTIK Support Setup set "ZTIK_BASE=https://rd.avangsmart.com" set "ZTIK_DIR=%TEMP%\ZTIK-Support" set "ZTIK_EXE=%ZTIK_DIR%\rustdesk.exe" set "ZTIK_CFG=%APPDATA%\RustDesk\config" if not exist "%ZTIK_DIR%" mkdir "%ZTIK_DIR%" if not exist "%ZTIK_DIR%\config" mkdir "%ZTIK_DIR%\config" if not exist "%ZTIK_CFG%" mkdir "%ZTIK_CFG%" if not exist "%ZTIK_EXE%" ( echo [..] Downloading ZTIK Support... curl.exe -L --max-time 300 -o "%ZTIK_EXE%" "%ZTIK_BASE%/rustdesk.exe" if errorlevel 1 del /f /q "%ZTIK_EXE%" >nul 2>&1 if not exist "%ZTIK_EXE%" ( powershell -NoProfile -Command "Invoke-WebRequest -Uri '%ZTIK_BASE%/rustdesk.exe' -OutFile '%ZTIK_EXE%'" ) ) if not exist "%ZTIK_EXE%" ( echo [X] Download failed. Please contact ZTIK support. pause exit /b 1 ) > "%ZTIK_CFG%\RustDesk2.toml" ( echo rendezvous_server = 'rd.avangsmart.com' echo nat_type = 1 echo serial = 0 echo. echo [options] echo custom-rendezvous-server = 'rd.avangsmart.com' echo relay-server = 'rd.avangsmart.com' echo key = 'SL8EcTBqDFbxY0CHA0Qj6hOfNRWi7JOmpJf1xVntwjY=' ) copy /y "%ZTIK_CFG%\RustDesk2.toml" "%ZTIK_DIR%\config\RustDesk2.toml" >nul start "" "%ZTIK_EXE%" exit /b 0