Donation Goal
Donate Now Goal amount for this year: 799 USD, Received: 100 USD (13%)
Please donate to help support this website. The funds will be used to purchase owned license of LiteSpeed Web Server Enterprise (2-CPU). It provides superior performance in terms of raw speed, scalability and anti-DDoS capabilities.

Disable Program Has Stopped Working Error Dialog in Windows Server 2008

Posted By Raymond In Category: Computer

Aug
12
2009

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


Related posts:
  • How To Copy Text or Error Messages from Any Dialog Boxes in Windows
  • Google 502 Server Error
  • FIX Fatal error: Allowed memory size of 8388608 bytes exhausted ERROR
  • How To Resize An Unresizable Window or Dialog Box
  • Guide to Install Free SME Server Linux Operating System as File Server
    • Firas

      Thank you Raymond, but does this trick works with vista too ?

    • Supa Chiney

      yeah how to disable it on vista / windows 7

    • Lee McKenzie

      Second registry key worked perfectly for me in Windows 7. Thanks a lot.

    • wSe7n

      Windows 7 Ultimate x86/64

      1.Head to Start
      2.Select Control Panel
      3.Select System and Security
      4.Select Action Center
      5.Select Change Action Center settings
      6.Select Problem reporting settings
      7.Select Change report settings for all users
      8.Select Never check for solutions(not recommended)
      9.Select the Ok button to apply the settings

    • Justin

      Thank You Thank You Thank You .. I can believe how little there is about this on the net .. this is a huge problem for video encoding aswell if the process crashes .. it just hangs open .. until you click the close item …

      PS wSe7n solution does not work .. as you pointed out in your post .. it still pops up with the message .. an doesnt auto close

    • wildman

      Im going back to XP. Looks like another blunder by microsoft.

    • Gonzalo

      Thank you very much. This was incredibly useful, my gameservers are now restarting perfectly.

    • jovan

      nemozam da e uklucam kanter pisi eror

    • wa7sh

      it didint work for me plz wen i play any game its say cloes program

    • Chris

      When I attempt this, the UI is effectively disabled, however the batch script seems to be getting a ctrl-c from somewhere? It’s asking if I want to terminate the batch script. I suppose I could start the batch script with echo n|, but that would only work once… Any ideas?

    • Smoke

      Thanks, I was about to fly to MS headquarters and murder them all over this..

      I mean seriously, asking me if I want to close a crashed application? First off, it’s already closed if it crashed, or close enough. Second, the hell am I going to do with it, keep it around, start a fucking crashed app collection, show it off to friends? (This is my crashed IE, this is my crashed Notepad, do you see? Look at the things I’ve done, the programs I’ve crashed, do you see?)

      Anyways, thanks, you’ve saved me from a life in prison. :)

    • http://www.miniot-online.com juan

      hi i need technical assistance, I have windows 2008 r2 server and I need to disable the window that says close program on my computer because I have programs that are self restats and affects that restate as I stop that window to do that and if my program run automatically?

    • Adam

      for windows 2008 r2 go to local group policy (from run gpedit.msc) then enable Prevent display of the user interface for critical errors

    • Chuck

      This worked perfectly! Thanks…

    Copyright © 2005-2012 - Raymond.CC Blog