Search code examples
batch-filecommand-linecommand-promptsteam

Steam halting execution of batch script


I'm trying to open a Steam game from a batch script and am running into a problem.

I've tried both these approaches:

@echo off
SETLOCAL EnableExtensions

C:\asdf\Steam\steam.exe steam://rungameid/238960

echo ASDF

and

@echo off
SETLOCAL EnableExtensions

start "" "D:\fdsa\Path of Exile\PathOfExile_x64Steam.exe"

echo ASDF

Both of these open a command prompt, run Steam (if it's not running) and open Path of Exile successfully, but neither approach prints out ASDF into the opened command prompt (i.e. neither approach actually reaches the code I want to execute after opening the game). Why is that?


Solution

  • As mentioned in my comment above (just in case anyone else has this issue) this should fix it up:

    @echo off
    SETLOCAL EnableExtensions
    
    start "" "steam://rungameid/238960"
    
    echo ASDF