When applications run under FireDaemon, they may popup a dialog box. This will cause the service to appear "hung" due to the dialog needing a response (eg. 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.
Windows Error Reporting dialogs can be simply 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
- Click on the Error Reporting button
- Click on the
Disable error reporting radio button and uncheck
But notify me when critical events occur. Windows Error Reporting is now disabled.
Also, in FireDaemon v1.8 and later, we have a Dialogs tab:
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 popup by inspecting the title bar content and any buttons that are present. It's not fool proof so be prepared to experiment. Here's an example of what you might see in the popup log file:
Code:
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:
Code:
<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>