| 1 | :: Launch GTA Online Patch |
| 2 | :: This batch file will automatically launch GTAV if not started, look for the process and inject using Xenos |
| 3 | :: You should probably at minimum change the GTADIR parameter below to where your GTA5.exe is |
| 4 | :: It will run Xenos64 in the folder the bat file is ran from, for the profile "OnlinePatch.xpr64" |
| 5 | |
| 6 | :: Links |
| 7 | :: Xenos - https://github.com/DarthTon/Xenos |
| 8 | :: Online Patch Booster - https://github.com/QuickNET-Tech/GTAO_Booster_PoC |
| 9 | @echo off |
| 10 | ::If you want to auto launch as admin, uncomment this: |
| 11 | ::if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) |
| 12 | |
| 13 | :: !!! These variables may need to be changed |
| 14 | |
| 15 | :: The directory where PlayGTAV.exe and GTAV.exe are located |
| 16 | Set GTADir="S:\Grand Theft Auto V" |
| 17 | :: Is the game STEAM or WAREHOUSE? TRUE for STEAM, blank for WAREHOUSE |
| 18 | Set IsSteamVersion=true |
| 19 | :: How long until after process detected to inject? (in seconds) |
| 20 | :: 1 second allows for patch to skip r* credits, > 2 will be too late. |
| 21 | Set WaitToInject=1 |
| 22 | :: The name of the injector profile with the extension |
| 23 | Set ProfileName=OnlinePatch.xpr64 |
| 24 | :: The directory to find the executable, defaults to location of this .bat file |
| 25 | set ExecutableDir="%cd%" |
| 26 | |
| 27 | |
| 28 | :: Executables |
| 29 | Set Process=GTA5.exe |
| 30 | Set RockstarLauncher=Launcher.exe |
| 31 | Set Executable=Xenos64.exe |
| 32 | |
| 33 | :: If GTA5.exe not running, starts via PlayGTAV.exe (May not work on Steam version) |
| 34 | cd /D %GTADir% |
| 35 | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul |
| 36 | If errorlevel 1 ( |
| 37 | echo Game is not running, starting. STEAM: %IsSteamVersion% |
| 38 | If defined IsSteamVersion ( |
| 39 | start "" "steam://run/271590//-goStraightToMP -StraightIntoFreemode/" |
| 40 | ) else start PlayGTAV.exe -goStraightToMP -StraightIntoFreemode |
| 41 | ) |
| 42 | |
| 43 | :: Starts looking for the process |
| 44 | echo Looking for %Process%... |
| 45 | :findGTA |
| 46 | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul |
| 47 | If not errorlevel 1 ( |
| 48 | :: If process is found, inject. |
| 49 | echo GTAV Found, Running %Executable% for Profile %ProfileName% |
| 50 | cd /D %ExecutableDir% |
| 51 | timeout /t %WaitToInject% |
| 52 | echo Running executable |
| 53 | start /WAIT %Executable% --run %ProfileName% |
| 54 | echo Executable ran, will automatically close when game exits. |
| 55 | goto waitForGameExit |
| 56 | ) else ( |
| 57 | :: Process still not found, continue loop after 1s |
| 58 | timeout /t 1 /nobreak > nul |
| 59 | goto findGTA |
| 60 | |
| 61 | ) |
| 62 | |
| 63 | :waitForGameExit |
| 64 | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul |
| 65 | If errorlevel 1 ( |
| 66 | echo Detected game has closed, exiting... |
| 67 | timeout /T 2 /nobreak > nul |
| 68 | echo Closing social club launcher |
| 69 | wmic process where name="%RockstarLauncher%" call terminate |
| 70 | ) else ( |
| 71 | timeout /t 6 /nobreak > nul |
| 72 | goto waitForGameExit |
| 73 | ) |
jackz / launch_gtao_patch.bat
Last active 2 months ago
Revision fd9cb5b5228af91d31d4e06672894c14d7e21fee