AEMS licensing¶
Applies to AEMS 1.0.8.0
This documentation describes AEMS 1.0.8.0 (service 0.1.9.0, driver 1.0.8.0, Allow-list Tool 1.3.0.0), released 2026-11-20. Install 1.0.8.0. Text marked "from 1.0.8.0" does not apply to earlier versions. Where the text says "from 1.0.6.0", it applies to 1.0.7.0 and 1.0.8.0 as well.
From 1.0.6.0 AEMS needs a license key from Logic Unknown ApS. Without a valid
license AEMS does not elevate: every allow-listed application starts
unelevated, as if AEMS were not installed, and each refused launch is logged
(event 2011). Everything else keeps working: the service runs, logs, reads its
configuration, and uninstall and upgrades work as before. A fresh install without a
key is unlicensed at once (event 3013, reason missing); there is no silent free period.
If the license stops being valid while an application runs, the programs it then starts in place
(Children in place) are refused (event 2204), and no copy starts.
The license check runs entirely on the device: the key is verified offline against the signature of Logic Unknown ApS and the device clock. AEMS never contacts a license server and has no portal or online dependency.
Get a key¶
- Trial (30 days): trial keys are not available yet; ask Logic Unknown ApS through the contact page.
- Paid (standard) license: contact Logic Unknown ApS through the contact page. A standard license has a 14-day grace after its expiry date; a trial has none.
The key is one line of text (<payload>.<signature>, letters, digits, -, _ and
one .). Treat it as confidential: it is not bound to a device, so whoever has it
can use it until it expires.
Where the key is visible once applied (plan for it):
- Registry read access.
HKLM\SOFTWARE\Logic Unknown\AEMS\License(and the policy value, and a stagedAEMS-LicenseRequest) have the defaultHKLM\SOFTWAREACL: every local user, also a standard user, can READ the key on a device. Only administrators (and, withTamperProtection=1, only AEMSvc) can change it. - Command lines.
msiexec ... LICENSEKEY=<key>puts the key on the msiexec command line, and the MSI passes it on the command line ofAEMSvc.exe --msi-write-license. The MSI log masks it, but process-creation auditing (event 4688 with command line), Sysmon, EDR telemetry and deployment tools record command lines, and Intune and other management tools store the install command and log it on the device. --set-licensereads the key from standard input, so it is in no command line; a key pasted at the console prompt stays in the console scroll-back until the window closes.
For fleets, prefer the Group Policy / Intune policy value or a customer MSI built with Build-MsiWithSettings.cmd, which is provided by Logic Unknown ApS (the key is then inside the MSI, not in a command line) over
LICENSEKEY in an RMM command line.
Apply a key¶
Use any one of these (the policy value wins when both exist):
| Way | How |
|---|---|
| At install (MSI property) | msiexec /i AEMS.msi /qn LICENSEKEY=<key>. The property is hidden: the MSI log shows **********, but the key is on the command line (see above). AEMSvc verifies the key first and writes only a valid one to HKLM\SOFTWARE\Logic Unknown\AEMS\License, so a mistyped key never replaces a working license (event 3014). On a repair this works only while TamperProtection=0 or the driver is not loaded: with TamperProtection=1 the write is denied, only event 3014 says so and the MSI still succeeds; use --set-license instead. |
| On a running device | type aems-license.txt \| "C:\Program Files\AEMS\AEMSvc.exe" --set-license from an elevated prompt (PowerShell: Get-Content aems-license.txt \| & 'C:\Program Files\AEMS\AEMSvc.exe' --set-license). Without a pipe it asks you to paste the key. The key is read from standard input, so it never appears in a command line or the process list. An invalid key is refused (exit 1) and nothing changes. A valid key takes effect at once (event 1014). |
| Group Policy / Intune | REG_SZ License in HKLM\SOFTWARE\Policies\Logic Unknown\AEMS. This value wins over the base value, except when it is empty or holds only blanks: such a value is ignored, so clearing the policy field never hides a valid base license (--license-status and event 1013 / 3013 then name the base key as the source and say that the policy value is ignored). A policy value of the wrong type (not REG_SZ) still wins and fails closed (malformed). AEMS re-reads it every 10 minutes. |
| Customer MSI | Build-MsiWithSettings.cmd has an optional license field; the key is verified with the AEMSvc.exe the MSI packages and bundled as the base value (bundler guide). LICENSEKEY at install time overrides a bundled key. |
With TamperProtection=1 nobody but AEMSvc may write the settings key, so
--set-license hands the verified key to the running service (staged under
HKLM\SOFTWARE\Logic Unknown\AEMS-LicenseRequest, administrators only, plus a service
control), which verifies it again and writes it. AEMSvc opens that key without
following registry links and only ever deletes the key itself: a request key that is a
registry link (or is reached through one) is refused, removed as a link and logged as
3014, and nothing is read or changed. The hand-off writes only valid keys, but it does
REPLACE the current license with the staged one, also with a key that expires earlier
(for example a 30-day trial over a running standard license): --set-license is an
administrator action, also under TamperProtection=1.
--set-license exit codes:
| Exit | Meaning |
|---|---|
| 0 | Written (directly, or applied by AEMSvc through the hand-off). |
| 1 | Refused or nothing done: the key is invalid (or AEMSvc refused it), standard input could not be read (or is over 16 KiB), the caller is not elevated, or the key could not be staged. Nothing changed. |
| 2 | The key is valid and staged, but not written yet: AEMSvc is not running, did not answer within 15 seconds, or could not write it (event 3014 names the error). AEMSvc applies it at its next start. |
| 3 | The key was staged, but the hand-off key disappeared before AEMSvc answered (for example AEMSvc restarted and processed it). The outcome is not known to the command: check --license-status and events 1014 / 3014. |
Check the state at any time: "C:\Program Files\AEMS\AEMSvc.exe" --license-status
(exit 0 = elevation on, 1 = off). It prints the state, licenseId, customer, edition and
expiry, the source key (and whether an empty policy value was ignored) and the upgrade
grace window with its status (active, ended, not needed, or not applied because the
marker is ahead of the device clock), never the key.
If a registry read fails (for example while the value is being replaced), AEMS keeps
the last good state, logs warning 2015 once and re-reads every 60 seconds; after 3
failed reads in a row it treats the license as unreadable (3013 malformed, elevation
off) until a read succeeds again.
A new or replaced license takes effect without a restart: at once after
--set-license, otherwise within 10 minutes (AEMSvc re-reads the license every 10
minutes and at every start).
States¶
| State | When | Elevation | Events |
|---|---|---|---|
| Licensed | signature valid, issued at most 1 day in the future, not expired | on | 1013 at start and when the license changes |
| ExpiringSoon | licensed, expires within 14 days (trial: 5 days) | on | 2008 once per day |
| Grace | standard license expired less than 14 days ago (a trial has no grace) | on | 2009 once per day |
| UpgradeGrace | no valid license, the device ran AEMS 1.0.5.0 or earlier, within 30 days of the first 1.0.6.0 start (below) | on | 2010 once per day, naming the end date |
| Unlicensed | everything else: no key, malformed, bad signature, a key for another Logic Unknown product, not yet valid, expired | off | 3013 at start, on the change and once per day, with a reason code |
Reason codes in 3013: missing, malformed, bad-signature, wrong-product,
not-yet-valid, expired.
Upgrade grace (devices that ran AEMS 1.0.5.0 or earlier)¶
So that an upgrade does not stop elevation on devices that already use AEMS, the first
licensing-aware AEMS on a device whose settings from 1.0.5.0 or earlier are migrated
writes a marker once: REG_SZ LicenseUpgradeGraceStartUtc (UTC date and time) in
HKLM\SOFTWARE\Logic Unknown\AEMS (event 1015). For 30 days from that moment AEMS keeps
elevating without a license (state UpgradeGrace, warning 2010 every day with the end
date). Apply a license within those 30 days; after them the device is Unlicensed.
- Evidence of an upgrade is a settings migration: the 1.0.6.0 copy (or merge) of a non-empty legacy settings key (see Upgrading from 1.0.5.0 or earlier) into the new key, recorded by the
migration marker. Non-empty means any value (for example the
InstallDirthe old installer wrote) or any subkey (also an emptyApplicationskey), so an unconfigured 1.0.5.0 device counts as well. A legacy key that merely exists is not enough: an empty legacy key, or a legacy key created next to an installed 1.0.6.0, gives no grace. - The marker is written by the MSI upgrade step (before the new driver starts) or, as a
safety net, by AEMSvc at its start after its own copy (with
TamperProtection=1right after its driver handshake). It is always written before the old settings key is removed, and the old key is kept until it is written. It is written once and never renewed or overwritten. A fresh install gets no grace. - It lives in HKLM, so a standard user can neither write nor delete it. With
TamperProtection=1even administrators cannot change it (only AEMSvc can). An uninstall removes it with the rest of the settings key; a later fresh install then gets no grace. - Licensing is enforced against standard users; it relies on administrators not tampering with the device.
- The upgrade grace also covers a key that is present but not valid (for example an expired trial) while the 30 days last; event 2010 names the reason.
- Details for the upgrade itself: Upgrading from 1.0.5.0 or earlier.
Clock¶
AEMS uses the device's own UTC clock (no network time). A wrong clock fails towards Grace or Unlicensed, never towards more elevation:
- A clock that runs ahead reaches the expiry (and the end of a grace) early.
- A clock that is behind: a key issued more than 1 day after the device clock is
not-yet-valid, and--set-licenserefuses it (nothing is written). An upgrade-grace marker more than 1 day after the device clock (for example a kiosk with a dead clock battery that boots in the past until time sync) is not applied: the device is Unlicensed until the clock is right; event 3013 and--license-statusthen say "check the device clock". The grace still ends 30 days after the marker.
Keep the kiosk clock synchronised (domain or Windows time service).
Events¶
The license string and the requester e-mail address in it are never logged. Events name licenseId, customer, edition, trial, the expiry and which trusted key verified it.
| Id | Level | Meaning |
|---|---|---|
| 1013 | Information | Valid license (state Licensed, ExpiringSoon or Grace) at start and when it changes: licenseId, customer, edition, expiry, verifying key, source key. |
| 1014 | Information | A license was set by --set-license, by the TamperProtection hand-off or by LICENSEKEY. |
| 1015 | Information | The one-time upgrade-grace marker was written; names the end date. |
| 2008 | Warning | Once per day: the license expires within 14 days (trial: 5 days). |
| 2009 | Warning | Once per day: the license expired; AEMS elevates until the grace ends (date). |
| 2010 | Warning | Once per day: no valid license, upgrade grace until the named date, with the license reason. |
| 2011 | Warning | A caught allow-listed launch (or an opted-in child) was left unelevated because AEMS is not licensed. At most 20 per hour; the first one of the next hour says how many more were not logged. |
| 2015 | Warning | The license value or the upgrade-grace marker could not be read; the last good state is kept and the read is retried every 60 seconds (3 failures in a row: 3013). |
| 3013 | Error | AEMS is not licensed (reason code and detail, the source key, a clock hint when the upgrade-grace marker is ahead of the clock); elevation is off. At start, on the change, then once per day. |
| 3014 | Error | A key given to --set-license (hand-off) or LICENSEKEY was refused or could not be written, or the hand-off key was a registry link and was removed; the current license is unchanged. |