Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: ######### Configuration ###############
- set STEAMDIR=C:\Program Files (x86)\Steam
- :: #######################################
- :: Abort if Steam is already running
- tasklist /FO LIST|find "steam.exe" >NUL
- if %ERRORLEVEL%==0 (
- echo Steam is already running! Aborting.
- timeout /t 3 > NUL
- exit 1
- )
- echo Starting Steam...
- echo ------------------------------------------
- echo.
- :: Start in offline mode
- if "%1" == "offline" (
- :: Copy custom loginusers.vdf to start in offline mode and disable offline warning
- copy /Y "%~dp0\loginusers.vdf_offline" "%STEAMDIR%\config\loginusers.vdf" > NUL
- :: Copy custom steam.cfg to force offline mode and disable client update checks
- copy /Y "%~dp0\steam.cfg_offline" "%STEAMDIR%\steam.cfg" > NUL
- :: Start Steam silently
- start /b "" "%STEAMDIR%\steam.exe" -silent
- exit /b
- )
- :: Start in online mode
- if "%1" == "online" (
- :: Copy custom loginusers.vdf to start in online mode
- copy /Y "%~dp0\loginusers.vdf_online" "%STEAMDIR%\config\loginusers.vdf" > NUL
- :: Delete custom steam.cfg created for offline mode
- del /q /f "%STEAMDIR%\steam.cfg" > NUL 2>&1
- :: Start Steam
- start /b "" "%STEAMDIR%\steam.exe"
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement