launch_stand.bat
· 2.2 KiB · Batchfile
Raw
:: 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
)
| 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 | ) |