Documentation · for licence holders

Running XSN Rescue unattended

XSN Rescue can run an export from a script, a scheduled task or a terminal, with no window. It is the same XSN Rescue you installed — there is no separate program — and it goes through the same licence check as the window. Measured on macOS, and on Windows.

Who this is for

The headless command-line export is the automation licence, included with Estate (£999) and Enterprise (£1,995). The command refuses a Standard key — whether run by a scheduler or typed by hand — with exit code 3, and a Standard licence keeps exporting from the app window exactly as before. The files produced are the same for every paid licence — the Estate tier’s extras (search across the recovered corpus, custody packs, re-verification, consolidation) are separate features of the app, not extra outputs of this command.

Set up once

Open XSN Rescue, enter your licence key, and close it. From then on the command below finds that activation on this computer.

The command

macOS:

"/Applications/XSN Rescue.app/Contents/MacOS/infopath-rescue" --rescue-run --input "/path/to/form-or-folder" --report "/path/to/report.json" --export-dir "/path/to/exports"

Windows:

"C:\Program Files\XSN Rescue\infopath-rescue.exe" --rescue-run --input "C:\path\to\form-or-folder" --report "C:\path\to\report.json" --export-dir "C:\path\to\exports"

--input is one form (.xml), one template (.xsn), or a folder — every .xml and .xsn in that folder and all its sub-folders is rescued in one pass, and the outputs mirror the folder structure. Symbolic links are not followed. --report is where the run’s JSON report is written. --export-dir is the folder your recovered files go into; it is created if missing. Add --mask-sensitive to mask the fields the app flags as likely to hold regulated data (the same tick-box as in the window). All three of input, report and export-dir are required.

Windows, specifically

The command reads the activation from the Windows user profile it runs under (%APPDATA%) — run the scheduled task as the same Windows user who activated XSN Rescue. The Windows program has no console window of its own; a scheduler records its exit code, and to keep its messages, capture them (PowerShell: Start-Process -Wait -RedirectStandardError). The window and the command use the same licence folder: checked by an automated test, on macOS and on Windows, that asks the app framework where the window saves the licence and compares it with where the command reads it (on Windows, %APPDATA%\uk.co.highcalibertrading.infopath-rescue).

Not yet measured: typing the command at a Command Prompt, where the prompt may not wait for it or show its messages; and one end-to-end run with a real key activated in the window.

Which files you get

The same for every paid licence, exactly as in the window: the per-form CSV, JSON, HTML and PDF, attachments, the archive manifest and index, the estate inventory (HTML, JSON, PDF), the recovery-integrity report, the receipt and the run report — twelve files for one form. The Estate tier’s extras — search across everything recovered, custody packs, re-verification and consolidation — are features of the app, not extra outputs of this command.

Licence

Headless runs use the same activation the window uses. If there is no usable licence on this computer, the command writes nothing, leaves your originals untouched, prints a message that exporting is a paid entitlement, and exits with code 3. This is deliberate: automation never bypasses the purchase.

Exit codes, for your scheduler

What an unattended run never does

It never overwrites a file you already had — a clash is written as “name (2)” beside it. It never modifies your originals; each is hashed before and after, and the report records both values with a verified flag that is true only when they match. It never uploads anything. The command makes no network connection at all; the app window’s only network use is checking your licence key and whether your version is still supported.

Keeping the licence current: the command itself never contacts our servers. It uses the activation the app last checked, which stays valid for 21 days. Open XSN Rescue on that computer at least once every 21 days to keep the licence current — being online is not enough, because only the app window refreshes it. Past 21 days the command refuses with exit code 3.

Scheduling

macOS: a launchd agent or a cron line calling the command above. Windows: a Task Scheduler action calling the command above, run as the same Windows user who activated XSN Rescue. Because the command exits with a meaningful code, your scheduler can alert on anything other than 0.