Last active 1741880437

Revision bda5278b93dbc22df812bd0173bb5d8ae94215dd

launch_gtao_patch.bat Raw
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:: May not work on steam due to different launch system, but will automatically launch gtav (and the rockstar launcher!)
7
8:: Links
9:: Xenos - https://github.com/DarthTon/Xenos
10:: Online Patch Booster - https://github.com/QuickNET-Tech/GTAO_Booster_PoC
11@echo off
12
13:: !!! These variables may need to be changed
14
15:: The directory where PlayGTAV.exe and GTAV.exe are located
16Set GTADir="S:\Grand Theft Auto V"
17:: Is the game STEAM or WAREHOUSE? TRUE for STEAM, blank for WAREHOUSE
18Set 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.
21Set WaitToInject=1
22:: The name of the injector profile with the extension
23Set ProfileName=OnlinePatch.xpr64
24:: The directory to find the executable, defaults to location of this .bat file
25set ExecutableDir="%cd%"
26
27
28:: Executables
29Set Process=GTA5.exe
30Set RockstarLauncher=Launcher.exe
31Set Executable=Xenos64.exe
32
33
34:: If GTA5.exe not running, starts via PlayGTAV.exe (May not work on Steam version)
35cd /D %GTADir%
36tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
37If errorlevel 1 (
38 echo Game is not running, starting. STEAM: %IsSteamVersion%
39 If defined IsSteamVersion (
40 start "" "steam://run/271590//-goStraightToMP -StraightIntoFreemode/"
41 ) else start PlayGTAV.exe -goStraightToMP -StraightIntoFreemode
42)
43
44:: Starts looking for the process
45echo Looking for %Process%...
46:findGTA
47tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
48If not errorlevel 1 (
49 :: If process is found, inject.
50 echo GTAV Found, Running %Executable% for Profile %ProfileName%
51 cd /D %ExecutableDir%
52 timeout /t %WaitToInject%
53 echo Running executable
54 start /WAIT %Executable% --run %ProfileName%
55 echo Executable ran, will automatically close when game exits.
56 goto waitForGameExit
57) else (
58 :: Process still not found, continue loop after 1s
59 timeout /t 1 /nobreak > nul
60 goto findGTA
61
62)
63
64:waitForGameExit
65tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
66If errorlevel 1 (
67 echo Detected game has closed, exiting...
68 timeout /T 2 /nobreak > nul
69 echo Closing social club launcher
70 wmic process where name="%RockstarLauncher%" call terminate
71) else (
72 timeout /t 6 /nobreak > nul
73 goto waitForGameExit
74)