Advertisement
Guest User

SteamStart.cmd

a guest
Sep 18th, 2021
4,620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.23 KB | None | 0 0
  1. @echo off
  2.  
  3. :: ######### Configuration ###############
  4.  
  5. set STEAMDIR=C:\Program Files (x86)\Steam
  6.  
  7. :: #######################################
  8.  
  9.  
  10.  
  11. :: Abort if Steam is already running
  12. tasklist /FO LIST|find "steam.exe" >NUL
  13. if %ERRORLEVEL%==0 (
  14.     echo Steam is already running! Aborting.
  15.     timeout /t 3 > NUL
  16.     exit 1
  17. )
  18.  
  19. echo Starting Steam...
  20. echo ------------------------------------------
  21. echo.
  22.  
  23. :: Start in offline mode
  24. if "%1" == "offline" (
  25.    :: Copy custom loginusers.vdf to start in offline mode and disable offline warning
  26.     copy /Y "%~dp0\loginusers.vdf_offline" "%STEAMDIR%\config\loginusers.vdf" > NUL
  27.    :: Copy custom steam.cfg to force offline mode and disable client update checks  
  28.     copy /Y "%~dp0\steam.cfg_offline" "%STEAMDIR%\steam.cfg" > NUL
  29.    :: Start Steam silently
  30.     start /b "" "%STEAMDIR%\steam.exe" -silent
  31.     exit /b
  32. )
  33.  
  34. :: Start in online mode
  35. if "%1" == "online" (
  36.    :: Copy custom loginusers.vdf to start in online mode
  37.     copy /Y "%~dp0\loginusers.vdf_online" "%STEAMDIR%\config\loginusers.vdf" > NUL
  38.    :: Delete custom steam.cfg created for offline mode
  39.     del /q /f "%STEAMDIR%\steam.cfg" > NUL 2>&1
  40.    :: Start Steam
  41.     start /b "" "%STEAMDIR%\steam.exe"
  42. )
  43.  
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement