@echo off
title Grand Theft Auto 5 CMD Launcher
echo This script will start the game automatically for you, simply leave this open.
echo It will close automatically when done.
echo Please ensure you're not in the process of copying files/data as continuing beyond this point WILL affect any active files being copied, moved and deleted. Press Enter when you're ready.
PAUSE
cls
cd script_files
echo will you like us to start the speed boost script?
echo read the documentation for scripts.txt file in the script_files folder to find out what this is
SET /P ANSWER=Do you want to continue (Y/N)?
echo You chose: %ANSWER%
if /i {%ANSWER%}=={y} (goto :yes)
if /i {%ANSWER%}=={yes} (goto :yes)
goto :no
:yes
START SPEED_BOOST.bat
timeout 17

:no
echo CONTINUING WITH SCRIPT
cd script_files
CLS
ECHO.
ECHO --------------------------------------------------
ECHO Grand Theft Auto 5 CMD Launcher
ECHO --------------------------------------------------
ECHO.
ECHO 1 - Grand Theft Auto 5 (STEAM)
ECHO 2 - Grand Theft Auto 5 (Retail/Non-Steam)

ECHO.
SET /P M=Type 1 or 2 then press ENTER:
IF %M%==1 GOTO STEAM
IF %M%==2 GOTO NON-STEAM
:STEAM
START steam://rungameid/271590
GOTO NIKO

:NON-STEAM
START /W RETAIL_LAUNCHER.bat
GOTO NIKO

:NIKO
cd script_files
timeout 1
cls
START STOP_SCRIPT.bat
:: #time was change from 60 to 120 to give longer to let the game start
:: #and fix the slow Social Club start due to the process being set to low priority
timeout 120
:: #using high priority on a older/slower CPU can lower the FPS in-game
::::
:: #wmic process where name="GTA5.exe" CALL setpriority "high priority"
::::
wmic process where name="GTA5.exe" CALL setpriority "above normal"
wmic process where name="gtavlauncher.exe" CALL setpriority "idle"
wmic process where name="subprocess.exe" CALL setpriority "idle"
timeout 20
cls
echo LEAVE ME OPEN!
:LOOP
tasklist | find /i "gtavlauncher.exe" >nul 2>&1
IF ERRORLEVEL 1 (
  GOTO CONTINUE
) ELSE (
  ECHO looking to see if GTA 5 is still running
  Timeout /T 11 /Nobreak
  cls
  GOTO LOOP
)

:CONTINUE
START RESTORE_SCRIPT.bat
timeout 5
exit
::
:: CPU priority codes
::
:: Priority:
::
:: idle: 64
::
:: below normal: 16384
::
:: normal: 32
::
:: above normal: 32768
::
:: high priority: 128
::
:: real time: 256
exit
::Made by MRxSNIPES2