I'd like to launch an unrelated program from Steam, so that Steam shows me as playing that game even though I'm not. Specifically I'd like to open a browser and have Steam show me playing a game while it's open.
The only way to do this is to reposition the executable's command in the Launch Options, so your desired program runs first and the game doesn't run at all.
If %command%
exists in the Launch Options input, it's replaced with the full path to the game's executable. Otherwise, the game's executable is placed first.
The problem is, the browser takes anything after itself as a parameter to open a tab with.
"C:\Program Files\Waterfox\Waterfox.exe" https://url.com/ %command%
^ This opens the browser with two tabs; one tab to the url and another tab attemping to download the game's exe from my own computer.
"C:\Program Files\Waterfox\Waterfox.exe" https://url.com/ & REM %command%
^ If I try to use a command line comment, it just opens even more tabs: A tab to the URL, a tab to &
, a tab to REM
, and a tab to the exe file.
echo %command% & "C:\Program Files\Waterfox\Waterfox.exe" https://url.com/
^ If I try to do some command line trick like this, I get an error like "echo.exe not found".
some_empty_exe %command% & "C:\Program Files\Waterfox\Waterfox.exe" https://url.com/
^ Even if I do find a program to feed the parameter to, Steam will show me as not playing a game anymore as soon as the first program completes. (And doesn't even open the browser for some unknown reason.)
How do I dump that %command%
off somewhere so the desired program won't take it as an argument and Steam won't launch any executables before the desired program?
There is no general way to do what you want with that textbox only, Steam most likely passes that command line (after making a substitution) directly to the CreateProcessW function: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
All the things you tried: echo, rem, &, are parts of the windows command line shell, not the CreateProcessW API, so they won't work.
Your only option are therefore either: 1. using a dummy executable (or a batch script) that ignores the first argument and launches the second argument with the remaining arguments:
"C:\dummy_argument_skipper.bat" %command% "C:\Program Files\Waterfox\Waterfox.exe" https://url.com/
or 2. use an option that won't cause any extra unwanted effects in your target program:
"C:\Program Files\Waterfox\Waterfox.exe" https://url.com/ -start-debugging-server %command%