Skip to content

Instantly share code, notes, and snippets.

@amitxv
Last active March 29, 2024 16:54
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save amitxv/0c454ba09a2feb3dd38f29c333f68c04 to your computer and use it in GitHub Desktop.
Save amitxv/0c454ba09a2feb3dd38f29c333f68c04 to your computer and use it in GitHub Desktop.
Steam -no-browser after patch

Steam -no-browser after patch (Working June 2023)

  • Disregard the original steam shortcut and only use the batch scripts below to launch steam

  • There is a slight CPU utilization penalty which can be circumvented by suspending the problematic thread

steam-no-browser.bat:

@echo off
setlocal EnableDelayedExpansion

set "steam_path=C:\Program Files (x86)\Steam"

:: kill steam if is running
tasklist | findstr /i "steam.exe" && taskkill /f /im "steam.exe"

:: rename binary back to .exe as steam requires it to initialize
for %%a in ("cef.win7", "cef.win7x64") do (
    set "bin=!steam_path!\bin\cef\%%~a\steamwebhelper.exee"
    if exist "!bin!" (
        ren "!bin!" "steamwebhelper.exe"
    )
)

:: open steam
start "" "!steam_path!\steam.exe" +open steam://open/minigameslist -vgui

:: only continue if steamwebhelper is running in case steam is updating
:query_steamwebhelper
tasklist | findstr /i "steamwebhelper.exe" || goto :query_steamwebhelper

:: allow a few seconds for steam to initialize/login
timeout /t 5 /nobreak

:: rename binary and kill the process
for %%a in ("cef.win7", "cef.win7x64") do (
    set "bin=!steam_path!\bin\cef\%%~a\steamwebhelper.exe"
    if exist "!bin!" (
        ren "!bin!" "steamwebhelper.exee"
    )
)

taskkill /f /im "steamwebhelper.exe"

steam-normal.bat:

@echo off
setlocal EnableDelayedExpansion

set "steam_path=C:\Program Files (x86)\Steam"

:: kill steam if is running
tasklist | findstr /i "steam.exe" && taskkill /f /im "steam.exe"

:: rename binary back to .exe as steam requires it to initialize
for %%a in ("cef.win7", "cef.win7x64") do (
    set "bin=!steam_path!\bin\cef\%%~a\steamwebhelper.exee"
    if exist "!bin!" (
        ren "!bin!" "steamwebhelper.exe"
    )
)

:: open steam
start "" "!steam_path!\steam.exe"
@RamiroPrather
Copy link

To be honest, I don’t understand who downloads games on a poppy beech. It was only when I bought a poppy that I decided to check if it would run games? I decided to download steam games for mac, since there are official games and without viruses. Yes, many games will show themselves well on a MacBook, but it was not created for this. To me, this looks like violence against a laptop.

@sandr1x
Copy link

sandr1x commented Aug 26, 2023

alternative steamwebhelper_min.bat

What it does:

  • creates a Steam_min shortcut on desktop with a few launch options
  • hijacks steamwebhelper via IFEO and inserts couple CEF launch options that steam does not expose
    mainly --single-process and --enable-low-end-device-mode but doing it this way it works when steam asks for self-restarting to apply an update
  • default preset uses -vgui mode i.e. the old interface, but there's an OVERLAY variable at the top of the script to easily switch to the new interface (if you want to use the improved in-game overlay at the expanse of extra ram usage)
  • default preset uses --disable-background-networking and it generally helps, but you can fully disable networking for steamwebhelper (via fake localhost proxy) with the OFFLINE variable at the top of the script (then Friends, Store won't launch)
  • code can be copy-pasted in a batch script but also works in ps1 and directly in powershell console, each time you run it it will install or remove itself

-no-browser will surely be missed, there's no easy way to replicate it now without multiple downsides to killing and physically deleting the files on disk or forcefully suspending threads & etc. My alternative is a bit more graceful at it, and managed to reduce idle ram usage to under 100MB, but it's certainly not a killer.

Your script breaks steam. Steam Client WebHelper now consumes 100 MB less memory. But when you start steam normally, the program windows are black. When I reinstalled steam, it stopped working at all. Luckily I had a restore point.

@AveYo
Copy link

AveYo commented Aug 26, 2023

@sandr1x, the script has built-in undo - just had to run it again

@ammarpvl29
Copy link

@amitxv So, I just run the no browser bat and then run steam exe?

@EternalTranquility1
Copy link

@refriedfood what was @Luckz's comment? could you please share your current working method?

@distino
Copy link

distino commented Sep 2, 2023

Guys original "steam-no-browser.bat" still works, you just have to increase timeout /t 5 /nobreak to something like timeout /t 30 /nobreak

With the current 5 seconds steamwebhelper process gets killed and renamed too quickly and you get the "steamwebhelper is not responding" error. Increasing timeout will allow steam to properly initialize/login and you have a few seconds left to launch the game you want to play. After you're done playing and want to launch different game, you will have to kill steam.exe process(or right click tray icon and wait for error to appear, then select close steam) and launch it again with steam-no-browser.bat and start your game.

You don't even have to run "steam-normal.bat" anymore, as steam automatically restores steamwebhelper.exe on each launch if it detects that's missing(renamed).

@Satyam838
Copy link

If it worked at first and doesnt now, goto directory Steam\bin\cef and delete steamwebhelper.exee from both cef.win7 and cef.win7x64 folder and try again

@Zeryle
Copy link

Zeryle commented Sep 24, 2023

Thanks to distino and Satyam838 for sharing this information, it actually works

Guys original "steam-no-browser.bat" still works, you just have to increase timeout /t 5 /nobreak to something like timeout /t 30 /nobreak

With the current 5 seconds steamwebhelper process gets killed and renamed too quickly and you get the "steamwebhelper is not responding" error. Increasing timeout will allow steam to properly initialize/login and you have a few seconds left to launch the game you want to play. After you're done playing and want to launch different game, you will have to kill steam.exe process(or right click tray icon and wait for error to appear, then select close steam) and launch it again with steam-no-browser.bat and start your game.

You don't even have to run "steam-normal.bat" anymore, as steam automatically restores steamwebhelper.exe on each launch if it detects that's missing(renamed).

If it worked at first and doesnt now, goto directory Steam\bin\cef and delete steamwebhelper.exee from both cef.win7 and cef.win7x64 folder and try again

@dananjaya6005
Copy link

https://youtu.be/mFGs484Y620?si=owvxYWpshJ6TRMuc
check this video guys. you get some progress

@OptiJuegos
Copy link

OptiJuegos commented Sep 28, 2023

i made a edit to fix some little things & added code to detect if steam is installed

steam-no-browser.bat:

@echo off
setlocal EnableDelayedExpansion

title Steam No Browser

:: Check if steam.exe exists, if it doesn't in the specific route there will be an error
if exist "%SystemDrive%\Program Files (x86)\Steam\steam.exe" (
	set "steam_path=%SystemDrive%\Program Files (x86)\Steam"
    goto :StartScript
) else (
    goto :Error
)

:Error
cls

echo ========================================
echo "Steam.exe" wasn't detected, please edit
echo The script to solve it
echo ========================================
echo.

pause
exit

:StartScript
cls

:: kill steam if is running
tasklist | findstr /i "steam.exe" && taskkill /f /im "steam.exe"

:: rename binary back to .exe as steam requires it to initialize
for %%a in ("cef.win7", "cef.win7x64") do (
    set "bin=!steam_path!\bin\cef\%%~a\steamwebhelper.exee"
    if exist "!bin!" (
        ren "!bin!" "steamwebhelper.exe"
    )
)

:: open steam
start "" "!steam_path!\steam.exe" --disable-background-networking --enable-low-end-device-mode --single-process -cef-single-process -skipinitialbootstrap -quicklogin -oldtraymenu -silent

:: only continue if steamwebhelper is running in case steam is updating
:query_steamwebhelper
tasklist | findstr /i "steamwebhelper.exe" || goto :query_steamwebhelper

:: allow a few seconds for steam to initialize/login
timeout /t 15 /nobreak

:: rename binary and kill the process
for %%a in ("cef.win7", "cef.win7x64") do (
    set "bin=!steam_path!\bin\cef\%%~a\steamwebhelper.exe"
    if exist "!bin!" (
        ren "!bin!" "steamwebhelper.exee"
    )
)

:kill_process
taskkill /f /im "steamwebhelper.exe"
timeout /t 1 /nobreak
taskkill /f /im "steamwebhelper.exe"
timeout /t 1 /nobreak
taskkill /f /im "steamwebhelper.exe"
timeout /t 1 /nobreak

@sandr1x
Copy link

sandr1x commented Sep 29, 2023

@sandr1x, the script has built-in undo - just had to run it again

I'm back at it again. Your script works well. It reduced the RAM consumption by 2 times ( default 1064 vs script 686 ), but I don’t need it anymore) I just bought more RAM

@improvised-explosive-device
Copy link

@OptiJuegos i made a edit to fix some little things & added code to detect if steam is installed

renames the .exe, errors out and crashes without renaming it back :|

@phdfloppa
Copy link

phdfloppa commented Oct 12, 2023

@improvised-explosive-device try this new ver: https://cdn.discordapp.com/attachments/1069748073955348550/1159234052356849794/Steam_No_Browser.bat

Where is this from? Also, why does it open CS2:

:: open steam
start "" "!steam_path!\steam.exe" steam://rungameid/730 --disable-background-networking --enable-low-end-device-mode --single-process -cef-single-process -skipinitialbootstrap -quicklogin -oldtraymenu -silent

@Aetopia
Copy link

Aetopia commented Oct 14, 2023

steam://rungameid/730

It has that in the command ^.

Opening CS 2, so just remove it to prevent it from opening.

@Bloodninja93
Copy link

@improvised-explosive-device try this new ver: https://cdn.discordapp.com/attachments/1069748073955348550/1159234052356849794/Steam_No_Browser.bat

Newbie here - do I use this version (minus the CS2 part), or the original version but increase the timeout?

Is it possible to update the OP to fix this, and to remove all the functions which no longer works?

@amitxv
Copy link
Author

amitxv commented Dec 27, 2023

I'm not aware of a method that works currently. Haven't looked either since I don't use steam.

@techgamers2
Copy link

yup me to, i switched to epic games from steam coz 200mb to 400 mb is too much for me plus cpu spike by steam webhelper no matter what tweak i use they revert back after few updates by steam
as most games i play r already available in epic so i m using epic on Rare launcher open-source ,light , fast takes 40mb and closes automatically with game

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