Can I run a Steam app with a batch script?

I have had Steam for a while now and have figured out a lot of tricks and shortcuts for the program. There is still one thing I want to do, but can't figure out: I want to run a Steam app with a batch script to circumvent the Steam GUI. The app in question is GameMaker: Studio. If I try to run the app through the executable directly, I get the follwing error:

GameMaker must be run from within Steam!

I have attempted to use this script, but it does nothing:

Steam.exe "%APPPATH%"

I could just make a desktop shortcut using Steam, but I want to know how to do this with some scripting. Any helpful information is appreciated!


As Jeff Mercado mentions above Steam browser protocol is a possible solution. It's also possible to use it from a webpage or other apps that can open a page in your system's default browser, so it can be great with the command line combined with explorer "URL" for example.

One of the problems with this is if you set it to automatically open Steam links by default. The links can do things ranging from installing/launching a game to deleting it, along with a lot more that's not documented either officially in the Steam Command Line Options or unofficially from data extracted from the Linux version of Steam.

Another option is to use the Steam Command Line Options, as linked to above. It allows you to use more of the commands/etc, and you can do so far easier, so it's actually kind-of more powerful than the browser protocol but is not as cross-platform friendly. Of course if you're making a BATch script that doesn't really apply to your situation though ;)