Skip to content

Instantly share code, notes, and snippets.

@jesterjunk
Forked from uugr/start_steam.bat
Created February 11, 2022 14:01
Show Gist options
  • Select an option

  • Save jesterjunk/2b63ed921172789207e5db803ed6a0c2 to your computer and use it in GitHub Desktop.

Select an option

Save jesterjunk/2b63ed921172789207e5db803ed6a0c2 to your computer and use it in GitHub Desktop.
Start Steam via Batch Script (Switch Account)
::---------------------USAGE -----------
::Create a shortcut for steam.exe and add "-login username password" parameters to target w/o quotes
::Replace Shortcut Where You Want
::Edit Directory and name of the shorcut in :start_steam section for yourself
@echo off
tasklist /FI "IMAGENAME eq steam.exe" 2>NUL | find /I /N "steam.exe">NUL
if %ERRORLEVEL%==0 goto :kill
if %ERRORLEVEL%==1 goto :start_steam
:kill
taskkill/F /IM steam.exe
goto :start_steam
:start_steam
cd /d "D:\Program Files (x86)\Steam\"
start "" "account.lnk" /secondary /minimized
goto :exit
:exit
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment