Last active 1741880437

Revision f106bf26a540039a97a8d998ff78d5cceb8900a8

launch_gtao_patch.bat Raw
1:: Launch GTA Online Patch (v1.1)
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? 1 for STEAM, 0 for WAREHOUSE
18Set IsSteamVersion=1
19:: How long until after process detected to inject? (in seconds)
20Set WaitToInject=1
21:: The name of the injector profile with the extension
22Set ProfileName=OnlinePatch.xpr64
23:: The directory to find the executable, defaults to location of this .bat file
24set ExecutableDir="%cd%"
25
26
27:: Executables
28Set Process=GTA5.exe
29Set RockstarLauncher=Launcher.exe
30Set Executable=Xenos64.exe
31
32:: If GTA5.exe not running, starts via PlayGTAV.exe (May not work on Steam version)
33cd /D %GTADir%
34tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
35If errorlevel 1 (
36 echo Game is not running, starting. STEAM: %IsSteamVersion%
37 If IsSteamVersion equ 1 (
38 start "" "steam://run/271590//-goStraightToMP -StraightIntoFreemode/"
39 ) else start PlayGTAV.exe -goStraightToMP -StraightIntoFreemode
40)
41
42:: Starts looking for the process
43echo Looking for %Process%...
44:findGTA
45tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
46If not errorlevel 1 (
47 :: If process is found, inject.
48 echo GTAV Found, Running %Executable% for Profile %ProfileName%
49 cd /D %ExecutableDir%
50 timeout /t %WaitToInject%
51 echo Running executable
52 start /WAIT %Executable% --run %ProfileName%
53 echo Executable ran, will automatically close when game exits.
54 goto waitForGameExit
55) else (
56 :: Process still not found, continue loop after 1s
57 timeout /t 1 /nobreak > nul
58 goto findGTA
59
60)
61
62:waitForGameExit
63tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul
64If errorlevel 1 (
65 echo Detected game has closed, exiting...
66 timeout /T 5 /nobreak > nul
67 echo Closing social club launcher
68 wmic process where name="%RockstarLauncher%" call terminate
69) else (
70 timeout /t 6 /nobreak > nul
71 goto waitForGameExit
72)