Posts Tagged ‘windows’

Avoiding the “encountered a problem and needs to close” dialog on Windows

Tuesday, March 25th, 2008

When running some Perl batch programs on Microsoft Windows XP, I got frustrated that some sub-programs would crash and pop up a dialog box with a message “perl.exe has encountered a problem and needs to close”.

Since the dialog is modal, everything stops until I press a button, which is incredibly annoying! If it needs to close, then just close and get on with it!

After some digging around on the web, I found a way to suppress those dialogs:

KB#124873: Disabling System Hard Error Message Dialog Boxes

In short, set the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode
registry key to the value “2″.