jackz revised this gist 1 year ago. Go to revision
No changes
Jackz revised this gist 4 years ago. Go to revision
1 file changed, 70 insertions
launch_stand.bat(file created)
| @@ -0,0 +1,70 @@ | |||
| 1 | + | :: Launch | |
| 2 | + | @echo off | |
| 3 | + | title Launch GTA with Stand | |
| 4 | + | ||
| 5 | + | ||
| 6 | + | :: If you want to auto launch as admin, uncomment this: (Relaunches batch as admin) | |
| 7 | + | ::if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) | |
| 8 | + | ||
| 9 | + | :: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 10 | + | :: !!! These variables may need to be changed !!! | |
| 11 | + | :: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 12 | + | ||
| 13 | + | :: The directory where PlayGTAV.exe and GTAV.exe are located | |
| 14 | + | Set GTADir="S:\Grand Theft Auto V" | |
| 15 | + | :: The directory where Stand Launchpad.exe is located | |
| 16 | + | Set StandLaunchpadPath="D:\Cheats" | |
| 17 | + | :: Is the game STEAM or WAREHOUSE? TRUE for STEAM, blank for WAREHOUSE | |
| 18 | + | Set IsSteamVersion= | |
| 19 | + | ||
| 20 | + | :: Executables (You don't need to change these!) | |
| 21 | + | Set Process=GTA5.exe | |
| 22 | + | Set RockstarLauncher=Launcher.exe | |
| 23 | + | Set "StandLauncher=Stand Launchpad.exe" | |
| 24 | + | ||
| 25 | + | :: Check if Stand is Open | |
| 26 | + | tasklist /NH /FI "imagename eq %StandLauncher%" 2>nul |find /i "%StandLauncher%" >nul | |
| 27 | + | If errorlevel 1 ( | |
| 28 | + | echo Stand launchpad is not detected, launching | |
| 29 | + | start "Stand LaunchPad" /d %StandLaunchpadPath% %StandLauncher% | |
| 30 | + | ) | |
| 31 | + | ||
| 32 | + | :: If GTA5.exe not running, starts via PlayGTAV.exe (May not work on Steam version) | |
| 33 | + | cd /D %GTADir% | |
| 34 | + | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| 35 | + | If errorlevel 1 ( | |
| 36 | + | echo Game is not running, starting. STEAM: %IsSteamVersion% | |
| 37 | + | If defined IsSteamVersion ( | |
| 38 | + | start "" "steam://run/271590//-goStraightToMP -StraightIntoFreemode/" | |
| 39 | + | ) else start PlayGTAV.exe -goStraightToMP -StraightIntoFreemode | |
| 40 | + | ) | |
| 41 | + | ||
| 42 | + | :: Starts looking for the process | |
| 43 | + | echo Looking for %Process%... | |
| 44 | + | :findGTA | |
| 45 | + | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| 46 | + | If not errorlevel 1 ( | |
| 47 | + | :: If process is found, inject. | |
| 48 | + | echo Game Launched. Press any key to terminate game | |
| 49 | + | timeout /t -1 | |
| 50 | + | echo Closing game... | |
| 51 | + | wmic process where name="%Process%" call terminate > nul | |
| 52 | + | goto waitForGameExit | |
| 53 | + | ) else ( | |
| 54 | + | :: Process still not found, continue loop after 1s | |
| 55 | + | timeout /t 1 /nobreak > nul | |
| 56 | + | goto findGTA | |
| 57 | + | ||
| 58 | + | ) | |
| 59 | + | ||
| 60 | + | :waitForGameExit | |
| 61 | + | tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| 62 | + | If errorlevel 1 ( | |
| 63 | + | echo Detected game has closed, exiting... | |
| 64 | + | timeout /T 2 /nobreak > nul | |
| 65 | + | echo Closing social club launcher | |
| 66 | + | wmic process where name="%RockstarLauncher%" call terminate > nul | |
| 67 | + | ) else ( | |
| 68 | + | timeout /t 6 /nobreak > nul | |
| 69 | + | goto waitForGameExit | |
| 70 | + | ) | |
Newer
Older