Skip to content

Instantly share code, notes, and snippets.

@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