-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnyDesk_Reset_ID.bat
40 lines (32 loc) · 962 Bytes
/
AnyDesk_Reset_ID.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
::
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Запустите этот скрипт от имени администратора.
pause
exit /b
)
TASKKILL.exe /F /IM AnyDesk.exe /T >NUL 2>&1
set "configPath=%AppData%\AnyDesk\user.conf"
set "folderPath1=%AppData%\AnyDesk"
set "folderPath2=C:\ProgramData\AnyDesk"
set "tempFile=%folderPath1%\temp.conf"
if exist "%configPath%" (
findstr "^ad\.roster\.items" "%configPath%" > "%tempFile%"
move /Y "%tempFile%" "%configPath%"
)
for /D %%d in ("%folderPath1%\*") do (
if /I not "%%~nxd"=="user.conf" rd /S /Q "%%d"
)
for %%f in ("%folderPath1%\*") do (
if /I not "%%~nxf"=="user.conf" del /F /Q "%%f"
)
for /D %%d in ("%folderPath2%\*") do (
if /I not "%%~nxd"=="user.conf" rd /S /Q "%%d"
)
for %%f in ("%folderPath2%\*") do (
if /I not "%%~nxf"=="user.conf" del /F /Q "%%f"
)
echo Очистка завершена | by kreker0001
pause
exit /b