-
Star
(156)
You must be signed in to star a gist -
Fork
(54)
You must be signed in to fork a gist
-
-
Save janasco/c6168d17ed6eb4b6eaf7fd46fb775f60 to your computer and use it in GitHub Desktop.
| @echo off & setlocal enableextensions | |
| title Reset AnyDesk | |
| reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit) | |
| chcp 437 | |
| call :stop_any | |
| del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf" | |
| del /f "%APPDATA%\AnyDesk\service.conf" | |
| copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\" | |
| rd /s /q "%temp%\thumbnails" 2>NUL | |
| xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails" | |
| del /f /a /q "%ALLUSERSPROFILE%\AnyDesk\*" | |
| del /f /a /q "%APPDATA%\AnyDesk\*" | |
| call :start_any | |
| :lic | |
| type "%ALLUSERSPROFILE%\AnyDesk\system.conf" | find "ad.anynet.id=" || goto lic | |
| call :stop_any | |
| move /y "%temp%\user.conf" "%APPDATA%\AnyDesk\user.conf" | |
| xcopy /c /e /h /r /y /i /k "%temp%\thumbnails" "%APPDATA%\AnyDesk\thumbnails" | |
| rd /s /q "%temp%\thumbnails" | |
| call :start_any | |
| echo ********* | |
| echo Completed. | |
| echo( | |
| goto :eof | |
| :start_any | |
| sc start AnyDesk | |
| sc start AnyDesk | |
| if %errorlevel% neq 1056 goto start_any | |
| set AnyDesk1=%SystemDrive%\Program Files (x86)\AnyDesk\AnyDesk.exe | |
| set AnyDesk2=%SystemDrive%\Program Files\AnyDesk\AnyDesk.exe | |
| if exist "%AnyDesk1%" start "" "%AnyDesk1%" | |
| if exist "%AnyDesk2%" start "" "%AnyDesk2%" | |
| exit /b | |
| :stop_any | |
| sc stop AnyDesk | |
| sc stop AnyDesk | |
| if %errorlevel% neq 1062 goto stop_any | |
| taskkill /f /im "AnyDesk.exe" | |
| exit /b |
For me, the script created by digitalonellc worked great on Windows, I just had to insert the device PW again.
It didn't work if Anydesk is run without installing.
Fair enough, I do have Anydesk installed (Windows 11). Cheers.
It still worked on windows 10.
boa tarde galera, não consigo tirar o 999 segundos do Anydesk de jeito nenhum fiz de tudo, apaguei na pasta progam data, nos registro e nada
Aqui eu faço da seguinte maneira, uso a versão 5.5.3, ela não dá banimento.
Isso funcionou perfeitamente para mim! Obrigado.
Windows Instructions:
open terminal or cmd type notepad anydeskreset.bat
Paste the following, and after Run the batch file by double clicking or right click run as administrator.
:: BatchGotAdmin :------------------------------------- REM --> Check for permissions IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" ) ELSE ( >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" ) REM --> If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" set params= %* echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" exit /B :gotAdmin pushd "%CD%" CD /D "%~dp0" @echo off & setlocal enableextensions title Reset AnyDesk reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit) chcp 437 call :stop_any del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf" del /f "%APPDATA%\AnyDesk\service.conf" copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\" rd /s /q "%temp%\thumbnails" 2>NUL xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails" del /f /a /q "%ALLUSERSPROFILE%\AnyDesk\*" del /f /a /q "%APPDATA%\AnyDesk\*" call :start_any :lic type "%ALLUSERSPROFILE%\AnyDesk\system.conf" | find "ad.anynet.id=" || goto lic call :stop_any move /y "%temp%\user.conf" "%APPDATA%\AnyDesk\user.conf" xcopy /c /e /h /r /y /i /k "%temp%\thumbnails" "%APPDATA%\AnyDesk\thumbnails" rd /s /q "%temp%\thumbnails" call :start_any echo ********* echo Completed. echo( goto :eof :start_any sc start AnyDesk sc start AnyDesk if %errorlevel% neq 1056 goto start_any set AnyDesk1=%SystemDrive%\Program Files (x86)\AnyDesk\AnyDesk.exe set AnyDesk2=%SystemDrive%\Program Files\AnyDesk\AnyDesk.exe if exist "%AnyDesk1%" start "" "%AnyDesk1%" if exist "%AnyDesk2%" start "" "%AnyDesk2%" exit /b :stop_any sc stop AnyDesk sc stop AnyDesk if %errorlevel% neq 1062 goto stop_any taskkill /f /im "AnyDesk.exe" exit /bLinux instructions:
Open terminal
#use ifconfig to determine your wlan interface and use below to set random and permanent Replace your-interface-from-ifconfig with your interface name usually wlp3s0 wlan0, wlp0s0, etc. ifconfig sudo ifconfig your-interface-from-ifconfig down sudo apt -y install macchanger sudo macchanger -r -b your-interface-from-ifconfig sudo ifconfig your-interface-from-ifconfig up rm -rf ~/.anydesk sudo apt autopurge anydesk -y sudo apt -y install anydeskTo make a shortcut to the script,
sudo pico /sbin/resetanydeskand paste code above. change the wlan interface and save to /sbin/resetanydesk by pressing ctrl +o in pico then ctrl +x to exit, then runchmod +x /sbin/resetanydesk and run resetanydeskMacOS:
Quit Anydesk Remove Anydesk from Applications folder
Open terminal type:
mv ~/.anydesk ~/.anydesk.old rm -rf ~/.anydesk sudo sh -c "curl https://raw.githubusercontent.com/shilch/macchanger/master/macchanger.sh > /usr/local/bin/macchanger && chmod +x /usr/local/bin/macchanger" route -n get default | grep interface sudo macchanger -r - p your-interface-name-from-previous-stepDownload, install and Start Any desk (if it shows no id or the id is 0) then do a Logout from your MacOS user
Login again and start Anydesk
to revert changes rm -rf ~/.anydesk mv ~/.anydesk.old ~/.anydesk
it works, thanks
it works(Win), thanks
Windows Instructions:
open terminal or cmd type notepad anydeskreset.bat
Paste the following, and after Run the batch file by double clicking or right click run as administrator.
:: BatchGotAdmin :------------------------------------- REM --> Check for permissions IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" ) ELSE ( >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" ) REM --> If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" set params= %* echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" exit /B :gotAdmin pushd "%CD%" CD /D "%~dp0" @echo off & setlocal enableextensions title Reset AnyDesk reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit) chcp 437 call :stop_any del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf" del /f "%APPDATA%\AnyDesk\service.conf" copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\" rd /s /q "%temp%\thumbnails" 2>NUL xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails" del /f /a /q "%ALLUSERSPROFILE%\AnyDesk\*" del /f /a /q "%APPDATA%\AnyDesk\*" call :start_any :lic type "%ALLUSERSPROFILE%\AnyDesk\system.conf" | find "ad.anynet.id=" || goto lic call :stop_any move /y "%temp%\user.conf" "%APPDATA%\AnyDesk\user.conf" xcopy /c /e /h /r /y /i /k "%temp%\thumbnails" "%APPDATA%\AnyDesk\thumbnails" rd /s /q "%temp%\thumbnails" call :start_any echo ********* echo Completed. echo( goto :eof :start_any sc start AnyDesk sc start AnyDesk if %errorlevel% neq 1056 goto start_any set AnyDesk1=%SystemDrive%\Program Files (x86)\AnyDesk\AnyDesk.exe set AnyDesk2=%SystemDrive%\Program Files\AnyDesk\AnyDesk.exe if exist "%AnyDesk1%" start "" "%AnyDesk1%" if exist "%AnyDesk2%" start "" "%AnyDesk2%" exit /b :stop_any sc stop AnyDesk sc stop AnyDesk if %errorlevel% neq 1062 goto stop_any taskkill /f /im "AnyDesk.exe" exit /bLinux instructions:
Open terminal
#use ifconfig to determine your wlan interface and use below to set random and permanent Replace your-interface-from-ifconfig with your interface name usually wlp3s0 wlan0, wlp0s0, etc. ifconfig sudo ifconfig your-interface-from-ifconfig down sudo apt -y install macchanger sudo macchanger -r -b your-interface-from-ifconfig sudo ifconfig your-interface-from-ifconfig up rm -rf ~/.anydesk sudo apt autopurge anydesk -y sudo apt -y install anydeskTo make a shortcut to the script,
sudo pico /sbin/resetanydeskand paste code above. change the wlan interface and save to /sbin/resetanydesk by pressing ctrl +o in pico then ctrl +x to exit, then runchmod +x /sbin/resetanydesk and run resetanydeskMacOS:
Quit Anydesk Remove Anydesk from Applications folder
Open terminal type:
mv ~/.anydesk ~/.anydesk.old rm -rf ~/.anydesk sudo sh -c "curl https://raw.githubusercontent.com/shilch/macchanger/master/macchanger.sh > /usr/local/bin/macchanger && chmod +x /usr/local/bin/macchanger" route -n get default | grep interface sudo macchanger -r - p your-interface-name-from-previous-stepDownload, install and Start Any desk (if it shows no id or the id is 0) then do a Logout from your MacOS user
Login again and start Anydesk
to revert changes rm -rf ~/.anydesk mv ~/.anydesk.old ~/.anydesk
this work for me, thanks a lot.
It doesn't work in version 9.7.7.
After a few minutes, the message "The session will close in X minutes" appears.
Download AnyDesk Reset
Link reported:
Deceptive site ahead
Firefox blocked this page because it may trick you into doing something dangerous like installing software or revealing personal information like passwords or credit cards.
Download AnyDesk Reset
A link to 740 Mb installation package in the post instead of a script of a few Kb????????????????????????????????????????????????????????????????????
This file worked for me