What is an Application Definition?
An application definition is an XML file that tells AppProfileSafe which registry entries and files belong to a specific application. During an export, AppProfileSafe reads these definitions to determine what to back up. During an import, the definitions are not required — the manifest file contains all the information needed for restore.
File Location and Naming
Each application definition is stored as a single XML file in the AppDefinitions folder. The file name corresponds to the application name and is used as the EntryName throughout AppProfileSafe.
| Property | Details |
|---|---|
| Location | AppDefinitions folder (default: %ProgramData%\IT-Consulting Kinner\AppProfileSafe\AppDefinitions) |
| File name | {EntryName}.xml (e.g. Firefox.xml, Notepad++.xml) |
| XML namespace | urn:appprofilesafe:app:v1 |
| Schema | AppProfileSafe.App-v1.0.0.xsd |
The folder path is configurable in settings.xml via the <AppDefinitionsFolder> element.
XML Structure
A definition file has the following structure. The root element <AppDefinition> contains two optional sections: <Registry> and <Files>.
<?xml version="1.0" encoding="utf-8"?>
<AppDefinition xmlns="urn:appprofilesafe:app:v1"
EntryName="Firefox"
SchemaVersion="1.0.0">
<Registry>
<RegKey>HKCU\Software\Mozilla\Firefox</RegKey>
<RegValue>HKLM\Software\Mozilla\Firefox\CurrentVersion:Version</RegValue>
</Registry>
<Files>
<Folder>%APPDATA%\Mozilla\Firefox\Profiles</Folder>
<File>%APPDATA%\Mozilla\Firefox\profiles.ini</File>
</Files>
</AppDefinition>
Entry Types
Each definition supports four entry types, split across the <Registry> and <Files> sections:
| Entry Type | Section | Behavior During Export |
|---|---|---|
<RegKey> |
<Registry> |
Backs up the specified registry key recursively — all subkeys and all values under the key are included. |
<RegValue> |
<Registry> |
Backs up a single registry value. The path format is HIVE\Path\To\Key:ValueName. |
<Folder> |
<Files> |
Backs up the entire directory recursively — all files and subdirectories are included. |
<File> |
<Files> |
Backs up a single file. |
Both <Registry> and <Files> sections are optional — a definition can contain only registry entries, only files, or both.
Registry Hive Names
Registry paths use standard Windows hive abbreviations:
| Abbreviation | Full Name |
|---|---|
HKCU |
HKEY_CURRENT_USER |
HKLM |
HKEY_LOCAL_MACHINE |
HKCR |
HKEY_CLASSES_ROOT |
HKU |
HKEY_USERS |
HKCC |
HKEY_CURRENT_CONFIG |
Both short and long forms are accepted. During import, paths are normalized to the short form (e.g. HKEY_CURRENT_USER → HKCU).
Environment Variables
File and folder paths support Windows environment variables. These are stored as-is in the definition file and resolved at runtime during export and import. This allows the same definition to work across different machines and user accounts.
Common variables:
| Variable | Typical Value |
|---|---|
%APPDATA% |
C:\Users\{Username}\AppData\Roaming |
%LOCALAPPDATA% |
C:\Users\{Username}\AppData\Local |
%ProgramData% |
C:\ProgramData |
%USERPROFILE% |
C:\Users\{Username} |
%ProgramFiles% |
C:\Program Files |
Schema Validation
AppProfileSafe validates every definition file against the XSD schema in two situations:
- When saving — The GUI editor validates the file after writing it. If validation fails, the save is rejected.
- When loading for export — The export process validates each definition before processing. Invalid definitions are shown with a warning in the Export window and can be edited using the raw XML editor.
The validator checks the current schema (AppProfileSafe.App-v1.0.0.xsd) first. If that file is not found, it falls back to the legacy schema name (AppProfileSafe.App.xsd).
Validation Rules
In addition to XSD schema validation, AppProfileSafe performs the following checks when saving a definition:
- No entry may have an empty path
- Duplicate entries (same type and path combination) are not allowed
- The
EntryNamemust not be empty
Next Steps
- Creating & Editing Definitions (GUI) — Use the structured editor to build definitions visually
- Fixing Invalid Definitions — Repair definitions that fail validation
- XML Schema Reference — Full schema documentation for all XML files