Steam Process Error

I have encountered this problem while using Steam on many different machines, if Steam is set to run on logon, occasionally it gives an error message if you try to run a game using the Steam Client just after logging on:
Steam is already running in another user process.

I have been fiddling around to try and find a way around this error, so you do not have to manually run the taskkill steam.exe command. I have came up with this code to be written to a .cmd file and saved in the Windows Startup Folder. The code is made to be slightly more user friendly and give a short timeout between commands to allow slower computers to handle the commands being given.

Code:
@echo off
cls
echo.
echo Hello %Username%! Welcome to Steam Reboot Script for Corrupted User Sessions.
title Steam Reboot Script: Waiting to complete logon - Ashley Scopes (c) 2012
echo.
echo.
echo Windows is given 10 seconds to fully load from here and become idle...
timeout /t 10 /nobreak
echo Log on timeout expired, now Killing Steam.exe Process
title Steam Reboot Script: Killing Steam.exe Process. - Ashley Scopes (c) 2012
taskkill /im steam.exe /t /f
echo Steam process kill command expired. Now allowing timoeut to completley kill process from process list, preventing crashes if process does not kill instantly...
timeout /t 5 /nobreak
echo Process Kill Break allowance expired. Now rebooting process... Thankyou for using Steam Reboot command!
start "Now Reviving Application: Steam.exe - Ashley Scopes (c) 2012" "C:\Program Files (x86)\Steam\steam.exe" \wait
exit
Any input is appreciated and it is free to use how you want, I was just wondering if there was any way to tidy it up a bit though.
 
When i get this problem, i simply go to task manager and end the process, nice .bat by the way, maybe just a simple bat which is smaller and lighter, or just make a .exe in basic or c++, and set it to run at startup, with a check to see if steam is even running first. :P
 
Back
Top