If the Need Target Application Directory configuration setting is True, the first time the user runs Stonefield Query, it prompts them to specify the location of the target application. To ensure the user selects the correct directory, you can create an Application.ValidateTargetAppDir event script. This script likely checks for the presence of a specific file in the directory the user specified. If the directory isn't valid, the script returns False and a warning message is displayed to the user. By default, the message is "The target application name directory is not valid" (where target application name is the name specified in the Target Application's Name configuration setting). However, you can change the message to anything you wish by filling in the Message for Invalid Target App Directory setting.