0
I need to create a batch scrpit that records the status of Anydesk in a time variable, and if it has the status 'offline' it restarts the Anydesk service. Example:
@echo off
for /f "delims=" %%i in ('"C:\Program Files (x86)\AnyDesk\AnyDesk.exe" --get-status') do set CID=%%i
echo AnyDesk status is: %CID%
pause
In this example it records the status of Anydesk in the CID variable, so I need to make command loop that when the status is different from online it restarts the service with the command below: Anydesk --Restart-service