|
|
Customizing Application Protection
When you protect an application, Diagnostics generates repair rules that specify how to detect and fix problems. For example, the repair rule for a file looks like this:
So when you audit an application, if the file is not found or its size does not match the size found when it was protected, a problem is detected.
Repair rules are saved in a copy of the profile. This copy is created when you protect the application, and is stored on the local computer.
About Repair Rules
The general form of a repair rule looks like this:
conditionis a logical expression that tests the values in an audit report.
actionsare predefined actions such as Fix it, Display Message, and Do Nothing. Fix it depends on the type of object.Customizing Repair Rules
When you protect an application, Diagnostics generates default repair rules. You can replace the default repair rules with customized repair rules.
To customize repair rules:
Generating Repair Rules
You can generate repair rules for files, ActiveX controls, shortcuts, environment variables, and registry values in the profile.
To generate repair rules for specific items:
- In the profile tree, click Files, Registry, ActiveX Controls, Environment Variables, or Shortcuts.
- Select one or more items.
Use the Shift and Ctrl keys to select multiple objects, or drag the pointer over the objects you want to select. To select by dragging, point to a blank area (for example, the whitespace after an item name) and then drag the bounding outline.
- Click Self Repair and then click Auto Build.
Diagnostics Console generates default repair rules for the selected objects.
Editing Repair Rules
To edit a repair rule:
Defining Conditions
A condition is one or more expressions joined by And or Or. Each expression tests the value of an object property. For example:
To define a condition:
- Click Add.
- Click in the Property box and select an object property. The Property box lists the object properties that can be used to build a condition.
Use the Audit Status property to test whether the object was found during the audit.
- Click in the Test box and select a logical test.
- Click in the Value box.
The value you enter here is compared against the value in an audit report.
Click Get
to get the current value of a property.
To test environment variables like PATH
Use the Contains test operator instead of the = operator. When Diagnostics gets the current value of the PATH environment variable, it gets the value for the current process (Diagnostics Console). So the path to the Diagnostics installation directory is added to the start of the PATH variable.
Defining Actions
Action Arguments
The Display Message and Go to URL actions each have an argument. For Display Message, the argument is the text to display. For Go to URL, the argument is the URL.
Action Captions
The caption is the text displayed on the button beside a problem in the Details view. The default caption is Fix it.
The width of the button is controlled by the Action column width preference. See Self-Repair Preferences.
Delete it
Deletes registry entries.
Delete it for Registry Keys
Diagnostics can delete a registry key and all of its descendants.
You do not need to add any condition to operate on keys. If the key exists, Diagnostics considers that the condition is met. If the key does not exist, the condition is not met.
Delete it for Registry Values
If you want to delete the registry value regardless of its current value, do not specify any condition. If the value exists, Diagnostics will delete it.
Display Message
Displays the message specified by the Argument field.
if ( condition ) Display Message Argument = "Condition met!" else Display Message Argument = "Condition failed!"In the Problem Diagnosis view, the Fix All button does not execute DIsplay Message actions. Only the Fix it button for a specific problem executes a DIsplay Message action.
Do Nothing
No action.
Fix it
Fix it for Files
Fix it for files extracts the file from the snapshot and puts it in the required location.
Fix it for ActiveX Controls and Self-Registered Files
If the file is not registered, is the wrong version, or is missing, Diagnostics gets the file from the snapshot and registers it. If the file is already present on the computer but is just not registered, Diagnostics registers it.
Fix it for Shortcuts
If a shortcut is broken, Diagnostics tries to fix it based on the path specified in the condition. But if the path does not point to an existing file, Diagnostics scans the system for the first occurrence of a file with the same name and fixes the shortcut to point to that file.
Fix it for Registry values
If a registry value does not meet the specified condition, Diagnostics updates the registry entry according to the criteria specified in the condition. Diagnostics can repair individual registry values only, not complete hierarchies.
Fix it for Environment Variables
Fix it updates the value of the environment variables to match the value found when the application was protected.
Go to URL
Starts the default browser and loads the URL specified in the Argument field.
In the Problem Diagnosis view, the Fix All button does not execute Go to URL actions. Only the Fix it button for a specific problem executes the Go to URL action.
Rename it
Renames a file.
Unregister it
Unregisters an ActiveX control.
Setting Attribute Values
To edit the attributes of a repair rule:
- In the profile tree, click Files, Registry, ActiveX Controls, Environment Variables, or Shortcuts.
- Click an item (a file, ActiveX control, shortcut, environment variable, or registry entry).
- Click Self Repair and click Build Condition.
- In the Attributes list, click in the Value field to edit the attribute value.
Auto Execute Action
If True, Diagnostics automatically executes the specified repair action.
Description
Text displayed between the problem title and the Show Details section in the Problem Diagnosis view.
Problem Description
![]()
Enable Self-Repair
If True, Diagnostics applies the repair rule. If False, the rule is disabled.
Locked
If True, the repair condition is not updated when you protect the application. By default, all repair rule conditions are regenerated when you protect the application.
Problem Priority
By default, Diagnostics sorts problems by priority, with the highest priority problems appearing at the top of the list. Lower numbers indicate higher priority.
Self-Repair Package
Specifies the snapshot file used to repair the problem. This attribute is automatically set when you protect an application.
Target Directory
Specifies where to put a file on the user's machine when the problem is fixed. This attribute is automatically set when you protect an application.
TargetDirectory is typically set to the value of a variable such as $(WinDir) or $(AppInstallDir).
Title
Text displayed after the Problem: label for a problem. To type or edit a multi-line title, click
.
Locking Customized Repair Rules
If you customize any repair rule conditions, you must lock the repair rules so the conditions are not overwritten with the defaults generated when you protect an application.
The condition is the logical expression tested by the if...then statement.
Self-Repair Preferences
Action column width
Width (in pixels) of the column that holds the Fix it button.
Diagnosis - Show Details
If True, Diagnostics displays problem details
Enable Self-Repair
Set to True when you protect an application (repair is always enabled for protected applications).
![]() Vector Networks http://www.vector-networks.com Voice: +44 (0) 1827 67333 Fax: +44 (0) 1827 67068 info@vector-networks.co.uk |
|
|