@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.