Files
HyperCLI/files/steam-logout.bat
2026-01-22 20:48:08 +01:00

38 lines
1.0 KiB
Batchfile
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
echo Logging out from Steam...
:: Kill Steam if running
taskkill /f /im steam.exe >nul 2>&1
:: Get Steam installation path from registry
for /f "tokens=2*" %%a in (
'reg query "HKCU\Software\Valve\Steam" /v SteamPath 2^>nul'
) do set SteamPath=%%b
:: If not found, try 64-bit registry key
if not defined SteamPath (
for /f "tokens=2*" %%a in (
'reg query "HKLM\SOFTWARE\Wow6432Node\Valve\Steam" /v InstallPath 2^>nul'
) do set SteamPath=%%b
)
:: If still not found, try 32-bit registry key
if not defined SteamPath (
for /f "tokens=2*" %%a in (
'reg query "HKLM\SOFTWARE\Valve\Steam" /v InstallPath 2^>nul'
) do set SteamPath=%%b
)
:: Check if Steam was found
if not defined SteamPath (
echo Steam installation not found!
pause
exit /b
)
:: Delete login cache files (forces logout)
del "%SteamPath%\config\loginusers.vdf" >nul 2>&1
del "%SteamPath%\ssfn*" >nul 2>&1
echo Steam has been logged out successfully.
echo You will need to manually start Steam and log in again.