@echo off
:-------------------------------------
REM --> Check for permissions
>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
set vbs="%temp%\getadmin.vbs"
REM create VBS script
echo Set UAC = CreateObject^("Shell.Application"^) > %vbs%
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> %vbs%
%vbs%
del %vbs%
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
echo.
:start
set /p WARN="WARNING. After you press enter, your ExpresVPN Data will be deleted"
echo Deleting .bin files from E×ρréššVPN Programdata Folder
DEL C:\ProgramData\E×ρréššVPN\v4\data\*.bin /S /Q
echo.
rem Restart E×ρréšš vpn service so we can enter new key again without re-installing the app
net stop "E×ρréššVPNService" /y
net start "E×ρréššVPNService"
echo.
goto start