When applications run under FireDaemon, they may pop up a dialog box. This will cause the service to appear "hung" due to the dialog needing a response (e.g. click OK).
There are two types of dialogs that may popup:
- Windows Error Reporting popups (most usually seen when the application crashes)
- Application popups initiated by the application itself.
Disabling Windows Error Reporting Popups
Windows Error Reporting dialogs can be disabled as follows:
- Right click on My Computer
- Choose Properties from the menu
- The System Properties dialog will be displayed
- Click on the Advanced tab
Then Click on the Error Reporting button under the Advanced tab:
Click on the Disable error reporting radio button and uncheck But notify me when critical events occur. Windows Error Reporting is now disabled.
Disabling Application Popups Within FireDaemon
FireDaemon v1.8 and later features a Dialogs tab when editing or creating a service definition:
The Dialogs tab enables you to capture and automatically close application generated popups along with system generated popups.
It's usually a good thing initially to Enable Dialogs and define a Log File so you can see what popups, if any, are being application generated. To close all popups irrespective of source (if you have an interactive application FireDaemon will attempt to close it!!):
- Check the Enabled check box
- Uncheck Only This Process
- Uncheck Ignore Unknowns
FireDaemon will attempt to close any dialogs that pop up by inspecting the title bar content and any buttons that are present. It's not foolproof so be prepared to experiment. Here's an example of what you might see in the popup log file:
Sun Aug 21 12:33:15 2005 [0xbdc]: Dialog Title - 'About Calculator' Sun Aug 21 12:33:15 2005 [0xbdc]: Unmatched text, details below: *********** Begin Dump *********** Microsoft ® Calculator Version 5.2 (Build 3790.srv03_sp1_rtm.050324-1447 : Service Pack 1) Copyright © 1985-2005 Microsoft Corporation James Bourne Sublime Solutions Pty Ltd Physical memory available to Windows: 2,096,524 KB *********** End Dump *********** Sun Aug 21 12:33:57 2005 [0xa94]: Dialog Title - 'About Calculator' Sun Aug 21 12:33:57 2005 [0xa94]: Matched a Rule. Looking for a button with 'OK' on it Sun Aug 21 12:33:57 2005 [0xa94]: Found the button and translated it to command 0x00000001 Sun Aug 21 12:33:57 2005 [0xa94]: Message 0x00000001 sent ok.
In this example, I am running the Calculator (calc.exe) under FireDaemon as a service. I've added a rule in the Dialogs section so that every time I go to Help/About in Calculator, FireDaemon will automatically close the dialog. Here is the XML fragment from the service definition:
<DlgResponder> <Enabled>true</Enabled> <CloseAll>false</CloseAll> <CheckFrequency>5000</CheckFrequency> <IgnoreUnknowns>true</IgnoreUnknowns> <LogFile>c:\temp\popups.log</LogFile> <Responses> <Response> <TitleString>About Calculator</TitleString> <ContentString></ContentString> <Response>OK</Response> </Response> </Responses> </DlgResponder> </Service>