Add Message Blockers (Standard 7 SP1)
Windows Embedded Standard 7 has two message blocking options, default reply and dialog-box filter. They can be used separately or in unison. The first package, Message Box Default Reply, automatically responds to all message boxes by using their default response. For more information, see Message Box Default Reply on MSDN. The second package, Dialog Box Filter, lets you define message windows based on a set of parameters (For example, process name, window title, dialog type, and a list of buttons). For each window, you can choose which button is used to dismiss the window. This package requires that you know which windows you want to block.
The method that Dialog Box Filter uses captures all windows before they are created and moves them off screen. At a later stage (when the window is drawn) it interrogates the window and uses the information in the configuration file (window title, process name, window class, and a list of buttons) to determine if this window should be blocked. If the window is in the configuration list, the filter will apply the action chosen by the user. The action chose must close the window. If the action does not close the window it will remain off screen and the behavior of the system may become unstable. The configuration file for Dialog Box Filter must be named : ConfigurationList.Xml and be located at ProgramData\Microsoft\DialogFilter\ConfigurationList.xml on the runtime image.
When a dialog is removed from the configuration file it is possible that the dialog will continue to be drawn off screen. This is because some windows save their last known location and use that when the window is created.
There are two ways you can create a configuration file.
Use the Dialog Filter Editor. Dialog Filter Editor allows you to capture any exposed window on a Windows 7 machine or a Standard 7 machine. You can choose the window and choose an applicable action. See the Dialog Filter Editor Technical Reference section for more information regarding the advantages and limitations of its use.
The Dialog Filter Editor creates an XML file for use with the Dialog Box Filter service. We do not recommend manually editing this file. If you manually edit the file, you should use the XML schema file (ConfigurationListSchema.xsd) that is deployed on the runtime to validate the XML using an XML validation tool. Failure to validate the XML file could cause unexpected behavior if the XML is not well-formed or does not conform to the schema.
Use the Windows event log to obtain the XML data that you need for the configuration file (The Action element must be added manually).
The Dialog Box Filter and Dialog Filter Editor do not always capture the same information regarding a specific window because the Dialog Box Filter intercepts the window at its creation. Some windows change their title, process name, class, and/ or buttons after they are created. Examples of this are applications such as Notepad. Notepad updates its title to include the document name after the window is created. In the event that a window fails to close after being configured with the Dialog Filter Editor, you should verify the XML created by using the log method described below.
To use the event log, you must do the following:
To use the event log to get the XML data for the configuration file
Run the event viewer (Eventvwr.exe).
Move to the directory Applications and Services Log/Microsoft/Windows/Dialog Filter/Operational.
Enable the log (either in the right-side window pane, or by right-clicking the mouse on the Operational directory then clicking Enable Log).
The Dialog Box Filter will log all windows it finds to the operational log. The information will include XML data that can be copied to the configuration file; for example:
<?xml version="1.0" encoding="UTF-8"?> <CL:dialogs xmlns:CL="urn:Dialogs"> <dialog> <ProcessImageName>notepad.exe</ProcessImageName> <Title>Untitled - Notepad</Title> <Class>Notepad</Class> <Buttons> <Button>Line up</Button> <Button>Line down</Button> <Button>Column left</Button> <Button>Column right</Button> <Button>Minimize</Button> <Button>Maximize</Button> <Button>Close</Button> </Buttons> <Actions> <Action>Close</Action> </Actions> </dialog> </CL:dialogs>
The Actions XML element featured above must be added manually.
Once you have a configuration file that you created using the Dialog Filter Editor or manually using the event log, you can add message blockers.
To add message blockers
Add the Message Box Default Reply package to your answer file (Unattend.xml).
Add the Dialog Box Filter package to your answer file. Use the Path setting to point to the location of the ConfigurationList.XML file. Deploy using the configuration set created with the above data file.
If you deploy your image without a configuration file or without the use of a configuration set then you must place the ConfigurationList.Xml file in its proper location for Dialog Box Filter to work. For example, you can copy the dialog filter configuration file to $OEM$\$1\ProgramData\Microsoft\DialogFilter\ConfigurationList.xml.
The XML file must be saved in UTF-8 format. You can do this using Notepad.exe and by choosing the Save As option, and then choosing the UTF-8 encoding option.
If you use Message Box Default Reply with Dialog Box Filter then Message Box Default Reply will handle all message box dialogs and you can configure Dialog Box Filter to handle other dialogs.
User Account Control (UAC) messages and escalated processes cannot be controlled or logged by the Dialog Box Filter. This is by design because allowing this could create potential security risks. As an alternative, you can configure UAC policies to automatically deny or approve escalation attempts
Message Box Default Reply is not supported on AMD64-based runtimes.