Technology Information: Disable Program Has Stopped Working Error Dialog in Windows Server 2008

Disable Program Has Stopped Working Error Dialog in Windows Server 2008

One of the most important thing when hosting a game server such as Counter-Strike Source is to make sure that the server is able to automatically restart itself when it crashes. It is perfectly normal for a CSS server to experience crashes when it is running a system-intensive mod such as ZombieMod and like all software they might not be free of bugs.

If you are hosting your game server on a linux or unix server, then you do not need to worry about auto restarting when crash because by default it can already do that via a script file. However for Windows, it cannot auto restart. If you check the srcds.com windows server tutorial, there is a part where it teaches you to create a batch file that monitors the srcds.exe process and if it is terminated, the batch file will run the specified command line to restart the CSS server.

Sorry to say that the batch file will not work because by default Windows shows an error window when it crashes. It will require someone to click on the “Close the program” button in order to restart via batch file. Here is how to disable the ErrorMode window so that you can use the batch file to auto restart CSS server when it crashes.
When the game crashes, the srcds.exe process is still running in background because of the error popup that says “srcds.exe has stopped working. Windows can check online for a solution to the problem.”.









If you disable Error Reporting, you will still get a similar error window that says “srcds.exe has stopped working. A problem caused the program to stop working correctly. Please close the program”.









To disable Error Reporting in Windows 2008 Server, just run the command below.

serverWerOptin /disable

I found another guide from MSDN on how the user can suppress system and application error messages from occurring on an embedded system. The registry location is at the following, by default the value data is 0 and we should change it to 2 to set all messages to invisible.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Windows\ErrorMode.

Weirdly even after doing all that, it’s still not enough to disable the error window when the game server crashes. So I continue digging and I found that there’s another important registry key which you need to modify in order to totally suppress the “.exe has stopped working” dialog.” Go to the following registry location and change the value data to 1.

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

Now you can run the batch file to monitor the srcds.exe process and it will auto restart when it crashes. I just can’t understand why there are no complete tutorials for running a CSS server. The information had to be scattered around and the server admin had to spend hours looking it up. By the way, there is a free software called ServerChecker which is able to restart your game server if it has crashed. It actually can automatically configure the registry to disable Windows Error Reporting and ErrorMode but it doesn’t support Windows 2008 Server.

0 comments:

Enter your mail address:
Template by - ADMIN | HiTechvnn Template