Srcds Batch File Auto Restarter -- needed

I did use this code in my batch file but it is basicly useless because it does not restart when it crash’s it just comes up with not responding and does not restart

@echo off
cls
echo Protecting srcds from crashes…
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait srcds.exe -console -game garrysmod +map gm_construct +maxplayers 16
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

so now i just use this

srcds.exe -console -game garrysmod +map gm_construct +maxplayers 16

i was just wondering if there was any more efficient crash dectector/auto restart batch file tool anymore?

thanks

Keep the script and go into regedit and go to this key:



HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Windows\ErrorMode


and change its value to 2.

Then go to this key:



HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\DontShowUI


and change its value to 1.

This should suppress the “not responding” dialog.

So this will fix the problem where it says SRCDS has Stopped Working?

Should do.

i found a safer workaround:

Do not touch your registry. You need to adjust the group policy for the computer to tell it not to display the window. Here’s how:

For Vista / Win7 / Server 2008 etc:

  1. Open start menu and type “gpedit.msc”. The Local Group Policy editor will appear.
  2. Navigate to Computer Configuration / Administrative Templates / Windows Components / Windows Error Reporting
  3. Edit the entry for “Prevent display of the user interface for critical errors”
  4. Set it to Enabled.

For Windows XP:

  1. Open start menu, click on Run, and type “gpedit.msc”. The Group Policy editor will appear.
  2. Navigate to Computer Configuration / Administrative Templates / System / Error Reporting
  3. Edit the entry for “Display error notification”
  4. Set it to Enabled.