@echo off
set RUSTDESK="C:\Program Files\RustDesk\rustdesk.exe"
taskkill /f /im rustdesk.exe >nul 2>&1
net stop RustDesk >nul 2>&1
timeout /t 2 >nul
rd /s /q "C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk"
rd /s /q "%AppData%\RustDesk"
timeout /t 2 >nul
:: Запуск службы
net start RustDesk >nul 2>&1
timeout /t 5 >nul
:: Настройка сервера
%RUSTDESK% --config "custom-rendezvous-server=155.212.245.106"
%RUSTDESK% --config "relay-server=155.212.245.106"
%RUSTDESK% --config "key=kh7K8SXhwXmtmKdvtNEQDP1mZr7oQSDOnbFhxBByLCk="
%RUSTDESK% --config "approve-mode=password"
%RUSTDESK% --config "verification-method=use-permanent-password"
%RUSTDESK% --config "allow-remote-config-modification=Y"
%RUSTDESK% --config "enable-unsecure-tls=Y"
:: Установка постоянного пароля
%RUSTDESK% --password "Lemon.3712"
timeout /t 2 >nul
taskkill /f /im rustdesk.exe >nul 2>&1
timeout /t 2 >nul
start "" %RUSTDESK%
echo Done
pause