Skip to content

Instantly share code, notes, and snippets.

View Stargateur's full-sized avatar

Stargateur

  • Nuant
  • France
View GitHub Profile
@AveYo
AveYo / . steam_overlay_clear.bat
Last active April 27, 2024 01:42
Steam minimal resource usage after removal of -no-browser & -vgui options. Enter script in powershell then use Steam_min shortcut on Desktop instead
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & timeout /t 7 & exit /b
# CLEAR THOSE ANNOYING MEDIA PLAYING STEAM OVERLAY BROWSER WINDOWS YOU FORGOT ABOUT - BY AVEYO
$found = $false; $utf8 = new-object Text.UTF8Encoding $false
$userdata = join-path (gp HKCU:\SOFTWARE\Valve\Steam SteamPath -ea 0).SteamPath 'userdata'; pushd $userdata;
dir -rec -file localconfig.vdf |% {
$cfg = $_; $data = [io.file]::ReadAllLines($cfg, $utf8); $ok = $true
if (($data |% {$_ -like '*OverlaySavedData*'}) -notcontains $true) { echo "$cfg : no steam overlay saved data"; $ok = $false }
if ($ok) { if (get-process -name Steam -ea 0) { start -wait "$(split-path $userdata)\Steam.exe" -args '-shutdown' } }