@echo off
title RustDesk ID Reset
echo Stopping RustDesk...
taskkill /f /im rustdesk.exe >nul 2>&1
net stop RustDesk >nul 2>&1
timeout /t 2 >nul
set FILE=C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config\RustDesk.toml
if not exist "%FILE%" (
echo RustDesk.toml not found
pause
exit
)
echo Editing RustDesk.toml...
powershell -Command ^
"(Get-Content '%FILE%') ^
-replace '^id = .*','id = ''0''' ^
-replace '^salt = .*','salt = ''''' ^
| Set-Content '%FILE%'"
echo Done editing config.
timeout /t 2 >nul
echo Restarting PC...
shutdown /r /t 5