Created
August 16, 2021 01:18
-
-
Save Jackzmc/1eb71934f0940a8a61f0a0f60244b7c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: Launch | |
| @echo off | |
| title Launch GTA with Stand | |
| :: If you want to auto launch as admin, uncomment this: (Relaunches batch as admin) | |
| ::if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) | |
| :: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| :: !!! These variables may need to be changed !!! | |
| :: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| :: The directory where PlayGTAV.exe and GTAV.exe are located | |
| Set GTADir="S:\Grand Theft Auto V" | |
| :: The directory where Stand Launchpad.exe is located | |
| Set StandLaunchpadPath="D:\Cheats" | |
| :: Is the game STEAM or WAREHOUSE? TRUE for STEAM, blank for WAREHOUSE | |
| Set IsSteamVersion= | |
| :: Executables (You don't need to change these!) | |
| Set Process=GTA5.exe | |
| Set RockstarLauncher=Launcher.exe | |
| Set "StandLauncher=Stand Launchpad.exe" | |
| :: Check if Stand is Open | |
| tasklist /NH /FI "imagename eq %StandLauncher%" 2>nul |find /i "%StandLauncher%" >nul | |
| If errorlevel 1 ( | |
| echo Stand launchpad is not detected, launching | |
| start "Stand LaunchPad" /d %StandLaunchpadPath% %StandLauncher% | |
| ) | |
| :: If GTA5.exe not running, starts via PlayGTAV.exe (May not work on Steam version) | |
| cd /D %GTADir% | |
| tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| If errorlevel 1 ( | |
| echo Game is not running, starting. STEAM: %IsSteamVersion% | |
| If defined IsSteamVersion ( | |
| start "" "steam://run/271590//-goStraightToMP -StraightIntoFreemode/" | |
| ) else start PlayGTAV.exe -goStraightToMP -StraightIntoFreemode | |
| ) | |
| :: Starts looking for the process | |
| echo Looking for %Process%... | |
| :findGTA | |
| tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| If not errorlevel 1 ( | |
| :: If process is found, inject. | |
| echo Game Launched. Press any key to terminate game | |
| timeout /t -1 | |
| echo Closing game... | |
| wmic process where name="%Process%" call terminate > nul | |
| goto waitForGameExit | |
| ) else ( | |
| :: Process still not found, continue loop after 1s | |
| timeout /t 1 /nobreak > nul | |
| goto findGTA | |
| ) | |
| :waitForGameExit | |
| tasklist /NH /FI "imagename eq %Process%" 2>nul |find /i "%Process%" >nul | |
| If errorlevel 1 ( | |
| echo Detected game has closed, exiting... | |
| timeout /T 2 /nobreak > nul | |
| echo Closing social club launcher | |
| wmic process where name="%RockstarLauncher%" call terminate > nul | |
| ) else ( | |
| timeout /t 6 /nobreak > nul | |
| goto waitForGameExit | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment