Skip to content

Instantly share code, notes, and snippets.

@janasco
Created August 3, 2023 09:46
Show Gist options
  • Save janasco/c6168d17ed6eb4b6eaf7fd46fb775f60 to your computer and use it in GitHub Desktop.
Save janasco/c6168d17ed6eb4b6eaf7fd46fb775f60 to your computer and use it in GitHub Desktop.
AnyDesk Reset
@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
@kumastergarcias
Copy link

kumastergarcias commented Mar 5, 2025

greetings and thank you very much
Does it still work for 2025?

How save the file: AnyDesk-Reset.cmd or AnyDesk-Reset.bat?

thank you

@kumastergarcias
Copy link

My hero of the day !

hi!!! How save the file: AnyDesk-Reset.cmd or AnyDesk-Reset.bat?

@Sicilianul
Copy link

My hero of the day !

hi!!! How save the file: AnyDesk-Reset.cmd or AnyDesk-Reset.bat?

Save as .bat file and run as administrator

@Martini002
Copy link

Stopped working, I have use it today and deleted all my previous and saved clients...

@digitalonellc
Copy link

digitalonellc commented May 15, 2025 via email

@digitalonellc
Copy link

Linux instructions:

#use ifconfig to determine your wlan interface and use below to set random and burned in

sudo ifconfig wlp2s0 down
sudo apt -y install macchanger
sudo macchanger -r -b wlp2s0
sudo ifconfig wlp2s0 up
rm -rf ~/.anydesk
sudo apt autopurge anydesk -y
sudo apt -y install anydesk

#save to /sbin/resetanydesk then chmod +x /sbin/resetanydesk and run resetanydesk

This will wipe your settings and hosts, if you want to save them:
mv ~/.anydesk ~/.anydesk.old

@SkyVan1eM
Copy link

i made it more simplier for me so all my clients remain, no need to delete user.conf in roaming/local.

@echo off
:: Check for administrative privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
    echo Requesting administrative privileges...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b)

echo Killing AnyDesk process...
taskkill /f /im AnyDesk.exe >nul 2>&1

echo Deleting service* and system* files from %ProgramData%\AnyDesk...
del /f /q "%ProgramData%\AnyDesk\service*" >nul 2>&1
del /f /q "%ProgramData%\AnyDesk\system*" >nul 2>&1

echo Starting AnyDesk...
start "" "C:\Program Files (x86)\AnyDesk\AnyDesk.exe"

echo Done.
pause

@umairinayat
Copy link

Worded

@crocangIt
Copy link

i made it more simplier for me so all my clients remain, no need to delete user.conf in roaming/local.

@echo off
:: Check for administrative privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
    echo Requesting administrative privileges...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b)

echo Killing AnyDesk process...
taskkill /f /im AnyDesk.exe >nul 2>&1

echo Deleting service* and system* files from %ProgramData%\AnyDesk...
del /f /q "%ProgramData%\AnyDesk\service*" >nul 2>&1
del /f /q "%ProgramData%\AnyDesk\system*" >nul 2>&1

echo Starting AnyDesk...
start "" "C:\Program Files (x86)\AnyDesk\AnyDesk.exe"

echo Done.
pause

It worked for me. Thank you.
(Started cmd.exe with admin privileges and pasted your script.)

@digitalonellc
Copy link

digitalonellc commented Jun 2, 2025 via email

@crocangIt
Copy link

Just please dont use anydesk for scams, thats all I ask.

On Mon, Jun 2, 2025 at 4:09 AM crocangIt @.> wrote: @.* commented on this gist. ------------------------------ i made it more simplier for me so all my clients remain, no need to delete user.conf in roaming/local. @echo off :: Check for administrative privileges net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrative privileges... powershell -Command "Start-Process '%~f0' -Verb RunAs" exit /b) echo Killing AnyDesk process... taskkill /f /im AnyDesk.exe >nul 2>&1 echo Deleting service* and system* files from %ProgramData%\AnyDesk... del /f /q "%ProgramData%\AnyDesk\service*" >nul 2>&1 del /f /q "%ProgramData%\AnyDesk\system*" >nul 2>&1 echo Starting AnyDesk... start "" "C:\Program Files (x86)\AnyDesk\AnyDesk.exe" echo Done. pause It worked for me. Thank you. (Started cmd.exe with admin privileges and pasted your script.) — Reply to this email directly, view it on GitHub https://gist.github.com/janasco/c6168d17ed6eb4b6eaf7fd46fb775f60#gistcomment-5602058 or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6VJAW5KK26QEBVYAR6SZT3BQBFHBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTEMZYGQ3DCNZRU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

I am not one of those.
I live in the Netherlands and occasionally help my family and friends in Croatia and Canada. Everything is according to the AnyDesk free account policy ('If you are a personal user, the usage of AnyDesk will remain free for you'), but they still sometimes mark me as a professional user.

@SkyVan1eM
Copy link

SkyVan1eM commented Jun 3, 2025

This script i use at my job. and also i would recommend another script that work with multiple scripts and multiple clients:
The idea is to host your scripts at your server or free hosting like hostinger/infinityfree. On your client pc you place a simple script that download actual script that you want to run, that is made so you can perfect your script and it will automaticly work for all, you just change it on your web hosting.
On client:

@echo off
set URL=http://yourhost.com/latest.bat
set FILE=%TEMP%\latest.bat

echo Downloading latest.bat...
powershell -Command "Invoke-WebRequest -Uri '%URL%' -OutFile '%FILE%'"

if exist "%FILE%" (
    echo Running latest.bat...
    call "%FILE%"
) else (
    echo Failed to download latest.bat
)
pause

On server you can place your actual script, like for anydesk or another easy fix. something like just calling calculator will work:

:: Modify as you wish
calc
del %TEMP%\latest.bat

The fact that you can delete the file is greate if they fire you, so u just delete the file on the hosting and they can't use your script, heheh xD

@info-ticoworks
Copy link

Que excelente!!! Muchas gracias!!

@AR-69
Copy link

AR-69 commented Jul 9, 2025

All methods doesn't seem to work any more for me.
I used to just delete the following two files:
"C:\ProgramData\AnyDesk\system.conf"
"C:\ProgramData\AnyDesk\service.conf"

and it would work. Now that is not the case anymore. Even with all the scripts provided here, none of them worked.
Each time Anydesk tries to connect to the network it fails and I get "Disconnected from the network".
Anyone else having this issue as well?

@itikumyap
Copy link

i have the same issue like AR 69 above anything doesnt seems to work anymore

@melodiazz
Copy link

can we do this on macos?

@digitalonellc
Copy link

i have the same issue like AR 69 above anything doesnt seems to work anymore

Uninstall, change Mac address, run script, reinstall.

@TechMorgan
Copy link

TechMorgan commented Jul 24, 2025

Can someone tell me whether the above code or the scripts below work?

https://github.com/henriquelucas/Reset-Licen-a-Anydesk
https://github.com/MKultra6969/AnyDesk-reset

@ugurkan-syntonym
Copy link

anyone for macos?

@digitalonellc
Copy link

digitalonellc commented Aug 13, 2025 via email

@digitalonellc
Copy link

digitalonellc commented Aug 13, 2025

Can someone tell me whether the above code or the scripts below work?

https://github.com/henriquelucas/Reset-Licen-a-Anydesk https://github.com/MKultra6969/AnyDesk-reset

They work, use the ones in the comments. I added a post below with all the OS instructions.

@digitalonellc
Copy link

digitalonellc commented Aug 13, 2025

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 /b

Linux 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 anydesk

To make a shortcut to the script, sudo pico /sbin/resetanydesk and paste code above.
change the wlan interface and save to /sbin/resetanydesk by pressing ctrl +o in pico then ctrl +x to exit, then run
chmod +x /sbin/resetanydesk and run resetanydesk

MacOS:

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-step

Download, 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

@GERENCIALG7
Copy link

GERENCIALG7 commented Aug 14, 2025

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

@edersilvago
Copy link

Is there an improvement to this cmd so that it can preserve the AnyDesk Alias? This feature would be perfect.

Screenshot_2 Screenshot_3 Screenshot_4 Screenshot_5

@GERENCIALG7
Copy link

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

@edersilvago
Copy link

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.

@edersilvago
Copy link

Screenshot_3

Link above blocked by antivirus

Copy link

ghost commented Aug 25, 2025

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 /b

Linux 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 anydesk

To make a shortcut to the script, sudo pico /sbin/resetanydesk and paste code above. change the wlan interface and save to /sbin/resetanydesk by pressing ctrl +o in pico then ctrl +x to exit, then run chmod +x /sbin/resetanydesk and run resetanydesk

MacOS:

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-step

Download, 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 does not work on MacOS. The ID was changed but still get the license notification.

@bruak
Copy link

bruak commented Aug 27, 2025

#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 anydesk

still works, but i did with my wired connection ensp2n0

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 /b

Linux 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 anydesk

To make a shortcut to the script, sudo pico /sbin/resetanydesk and paste code above. change the wlan interface and save to /sbin/resetanydesk by pressing ctrl +o in pico then ctrl +x to exit, then run chmod +x /sbin/resetanydesk and run resetanydesk
MacOS:
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-step

Download, 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 does not work on MacOS. The ID was changed but still get the license notification.

@pstranger90-sketch
Copy link

AnyDesk Reset HERE

Link has Maliciuos file inside, be Aware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment