@echo off rem --- Check if WinRAR is already installed --- if exist "C:\Program Files\WinRAR\WinRAR.exe" ( echo WinRAR is already installed, skipping UAC disable and reboot. exit /b ) rem --- Disable UAC --- echo Disabling UAC... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f echo UAC has been disabled. Please reboot for changes to take effect. pause rem --- Get the current directory (where this bat file is located) --- set "current_dir=%~dp0" rem --- Add task to Task Scheduler to run wnrr.bat after reboot --- echo Adding task to Task Scheduler to run wnrr.bat after reboot... schtasks /create /tn "RunWinRARBat" /tr "\"%current_dir%wnrr.bat\"" /sc onlogon /ru "%username%" /rl highest /f pause rem --- Reboot the computer --- echo Rebooting the computer... shutdown /r /t 0