How do I create an shortcut to a Steam game with a server specified?

Whenever I play a certain game online, I always join the same server.
Instead of starting the game through Steam, clicking "Join Server" selecting "History" then selecting the server, would it be possible to wrap all that into a single link that I can just click once and automatically load in?

17k 17 17 gold badges 81 81 silver badges 137 137 bronze badges asked Apr 28, 2015 at 23:15 41 1 1 silver badge 2 2 bronze badges

Might want to specify the game in your question. While you have a game in the tags, the question addresses all games. Due to how each game is made, this won't be a universal option and that will likely cause the question to be closed for being too broad. Focus on a specific game, and we'll see if it's possible.

Commented Apr 28, 2015 at 23:33 The game is Space Engineers. I put it as a tag, is there another way to add the specification? Commented Apr 28, 2015 at 23:38 I recommend putting steam as a tag, since my answer works for all steam games. Commented Apr 28, 2015 at 23:44 Great! Works perfect - way simpler than I thought it was going to be! Commented Apr 29, 2015 at 0:03

@ModSwap, making an executable for that would be out of our league. You're best making a program that runs the steam protocol addresses, shown below. Alternatively, if you have programming no skill at all; follow the instructions below and create the steam protocol command as a shortcut (.lnk) instead.

Commented Apr 29, 2015 at 0:05

1 Answer 1

You can always join a Steam enabled game via this command:

steam://connect/IP_ADDRESS:PORT 

So to join a Server on 127.0.0.1:27016 you would type:

steam://connect/127.0.0.1:27016 

Now, to get this into a shortcut, rightclick on your desktop and create a new Shortcut. In the upcoming dialog, enter the above command into the box after you replaced IP_ADDRESS with the address of the server, and PORT with the port number of the server):

Screenshot of Dialog

In the next Box, enter the name of the game or whatever you want:

Screenshot of Dialog

That creates a shortcut that will directly launch the game that the server belongs to and will connect you to it. Steam needs to be running for this.

While the screenshots where taken on Windows 7, it should be the same on Windows 8. This also works for all Steam Games that use Steamworks for Multiplayer.

Free Bonus DLC:

To change the icon of the created shortcut, rightclick it, select "Properties" in the upcoming menu, then select the "Change Icon" button. Then navigate to the .exe or .ico of your game and select it. In the next window that pop ups you can select a different icon for your shortcut taken from this .exe.

Screenshot of how to select an icon

Literal answer

To create a literal .exe out of this, put this code into a .cpp file:

#include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) < ShellExecute(NULL, L"open", L"steam://connect/127.0.0.1:27016", NULL, NULL, SW_SHOW); >

Then compile it with the free version of Visual Studio with this command:

cl /DYNAMICBASE "shell32.lib" /D"WIN32" /D"_UNICODE" /D"UNICODE" SpaceEngineers.cpp 

Then you can use this .exe to launch Space Engineers. Remember to replace the 127.0.0.1 with the address you want to connect to, and 27016 with the port that the server runs on.