Addition for "3. Connect to Server
Recently, they updated something in security, and a method for running client via left4dead2.exe (with arguments) in the same machine with a server is no more working.
Instead, here is a walkaround to run the app directly from steam.exe.
I'm attaching the full code of .bat script (to run server + join simultaneously):
:: For CS:GO
:: set path to your dedicated server''s srcds.exe
:: Example for L4D2 (remove :: prefixes)
:: Remove unnecessary optional arguments by your wish
SET OPTIONAL_ARG= -insecure +sv_pure 0 +sv_consistency 0 -debug -condebug
:: set path to your steam.exe
SET "STEAM_DIR=C:\Program Files (x86)\Steam"
SET "SERVER_ARG= -console -game %GAME_ALIAS% +hostport %PORT% +clientport 27006 +map %MAP_NAME% %OPTIONAL_ARG%"
SET "STEAM_ARG= -applaunch %appID% -dev -console -sw +sv_lan 1 -novid +connect %IP%:%PORT%"
:: We are launching the client before the server
start "" "%STEAM_DIR%\steam.exe" %STEAM_ARG%
timeout /t 3
:: launching the server
START "" /min "%SERVER_DIR%\srcds.exe" %SERVER_ARG%
For other games, change appID 550 by your game's Id from steam.inf file, and GAME_ALIAS value with an appropriate game name alias.