Configuration¶
Calibration Guard is configured via guard-config.json. When installed with VIA Onboard, this file lives at:
C:\Program Files\ViaOnboard\resources\guard-config.json
When running standalone, it lives in the same directory as guard.js (or guard.exe).
Full configuration reference¶
{
"registryPath": "HKLM\\SOFTWARE\\ViciCalibGuard",
"registryValue": "LicenseKey",
"watchPaths": [
"C:\\ViciVision\\mtl.ini"
],
"protectedSections": ["LOOKUP", "LOOKUP_VERT"],
"checkIntervalMinutes": 5,
"backupDir": "C:\\ProgramData\\ViciCalibGuard\\backups",
"logFile": "C:\\ProgramData\\ViciCalibGuard\\guard.log",
"expiryWarningDays": 7
}
Field reference¶
registryPath¶
Type: string
Default: "HKLM\\SOFTWARE\\ViciCalibGuard"
The Windows Registry key path where the license key is stored. Do not change this unless you have a specific reason — the License Key Server and the install-key.js tool both use this path by default.
registryValue¶
Type: string
Default: "LicenseKey"
The Registry value name under registryPath that holds the key string.
watchPaths¶
Type: array of strings
Required
Full absolute paths to the .ini files to protect. Use double backslashes.
"watchPaths": [
"C:\\ViciVision\\mtl.ini",
"C:\\ViciVision\\machine2.ini"
]
File must exist before the guard starts
The guard logs a warning if a file in watchPaths doesn't exist at startup, but it will not crash — it will continue watching the other paths and retry the missing one on each interval tick.
protectedSections¶
Type: array of strings
Default: ["LOOKUP", "LOOKUP_VERT"]
Section names to protect (case-insensitive). Only values inside these sections are monitored and restored on revert. All other INI content is left untouched.
To add temperature sensor protection:
"protectedSections": ["LOOKUP", "LOOKUP_VERT", "GAUGE"]
See How It Works — Protected Sections for the full list of protectable sections and what each contains.
checkIntervalMinutes¶
Type: number
Default: 5
How often the interval poller runs (in minutes) as a secondary check alongside the event-based file watcher. Setting this lower increases CPU usage slightly; setting it higher means more time before an unauthorized change is caught if the watcher misses an event.
For production use, 5 is a good balance. For highly sensitive installations, 1 is acceptable.
backupDir¶
Type: string
Default: "C:\\ProgramData\\ViciCalibGuard\\backups"
Directory where backup JSON files are stored. The guard creates this directory if it doesn't exist. You generally don't need to change this.
logFile¶
Type: string
Default: "C:\\ProgramData\\ViciCalibGuard\\guard.log"
Full path to the log file. The guard appends to this file — it does not rotate or truncate it automatically. If the file gets large, you can delete or truncate it; the guard will create a new one.
expiryWarningDays¶
Type: number
Default: 7
Number of days before license expiration at which to start showing the expiry warning dialog. Set to 0 to disable warnings. The warning is shown at most once per day.
Protecting multiple machines on one PC¶
If a single PC controls multiple ViciVision machines (each with its own .ini file), add all file paths to watchPaths:
"watchPaths": [
"C:\\ViciVision\\machine_a\\mtl.ini",
"C:\\ViciVision\\machine_b\\mtl.ini"
]
Each file gets its own independent backup in backupDir. A single license key covers all watched files.
Applying config changes¶
Calibration Guard reads guard-config.json once at startup. To apply changes:
- Edit
guard-config.json. - Open Task Scheduler, find ViciCalibGuard, and click End Task.
- Right-click ViciCalibGuard and click Run — or simply log out and back in (the Scheduled Task runs on logon).
Alternatively, from an elevated command prompt:
schtasks /End /TN ViciCalibGuard
schtasks /Run /TN ViciCalibGuard