Skip to content

Instantly share code, notes, and snippets.

@uugr
Created January 11, 2016 14:30
Show Gist options
  • Save uugr/6aa962e93baedc39ae33 to your computer and use it in GitHub Desktop.
Save uugr/6aa962e93baedc39ae33 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
@LuizBernardes
Copy link

I made one that has a menu for switching accounts, want to make a GUI or in add mine to yours?

if you want to discuss more about and do a project together contact me at discord Bernardes#2261

@JergenRoss
Copy link

JergenRoss commented Jun 18, 2023

please separate between taskkill and \F in taskkill/F /IM steam.exe on line 12 for clearly format style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment