6

How can I create a desktop shortcut that will automatically connect to a game server on launch? I have got this as a start up command "steam://rungameid/240 -connect 193.192.58.170:27015", but it doesn't connect just start the game... Is it possible? Thanks!

ZyteX
  • 63
  • 1
  • 1
  • 4

1 Answers1

6

You appear to be mixing command line options with Steam Browser protocol URLs.

The correct syntax for a Steam browser protocol link that auto-connects is:

steam://connect/193.192.58.170:27015

You'll note there's no game, as Steam is (usually) smart enough to determine what game to launch based on what game the server is running.

Alternatively, you could use a shortcut to the game's executable with the appropriate command line options, or set the command line options from the Steam Library properties for the game. In this case, you'd want to use:

+connect <ip>:<port> 

as part of the arguments to the game.

agent86
  • 118,734
  • 85
  • 395
  • 576
  • @ZyteX, no problem. Thanks for verifying I had it right :) – agent86 Apr 18 '12 at 21:07
  • I have a quick question. It obviously works for Counter Strike: GO, but how can it differentiate cs:go, cs:source, cs? – Ivanka Todorova Jun 10 '15 at 10:40
  • @IvankaTodorova, It should "just work" as Steam is communicating with the server to determine what game the server is running before launching the game on your local PC. This URL format should work for any Valve engine game, so TF2, CS:S, DoD, etc should all work. – agent86 Jun 10 '15 at 15:52
  • @agent86, that's pretty awesome. Have you used that quite often to find if it fails to run the game? :) – Ivanka Todorova Jun 10 '15 at 15:53
  • I don't see how to place this link in my steam profile. – Nakilon Oct 22 '17 at 06:16
  • You can add a password too with steam://connect/<ip>:<port>/<password>. – timotree May 08 '19 at 02:26