Skip to content

Configure AEMS

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.

All AEMS configuration is registry values under HKLM\SOFTWARE\Logic Unknown\AEMS, or under HKLM\SOFTWARE\Policies\Logic Unknown\AEMS when you push it as policy. AEMS reads its configuration when the service starts, so restart the service (Restart-Service AEMSvc) or the device after a change. The license is the exception: it is re-read every 10 minutes.

Common tasks:

Approve applications

AEMS only elevates apps you explicitly allow-list. Each approved app is a subkey under HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\<Name>.

Minimal example - approve an elevated Registry Editor:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Registry Editor]
"FriendlyName"="Registry Editor (elevated)"
"DataPath"="C:\\Windows\\regedit.exe"
"GlobalApplication"=dword:00000001

Save as apps.reg, then reg import apps.reg (elevated), then restart the service (Restart-Service AEMSvc). AEMS reads its configuration only when the service starts (and at every boot).

Per-app values:

Value Type Meaning
FriendlyName SZ Label used in audit/logging.
DataPath SZ Full path to the .exe to launch elevated. Without wildcards it is matched as a case-insensitive prefix of the launched path: always include the file name, because a folder path approves every program below it. From 1.0.6.0 it may be a wildcard pattern (*, ?); see Wildcard path rules.
Publisher SZ 1.0.6.0+. Leaf certificate CN of the file's embedded Authenticode signature. Required for a wildcard rule unless HashSHA is set; enforced on any entry that sets it.
PublisherThumbprint SZ 1.0.6.0+. Optional SHA-1 thumbprint (40 hex) of that certificate, checked in addition to Publisher.
Arguments SZ Optional args. For a standard user the elevated launch line is "<DataPath>" <Arguments> and the user's own arguments are discarded, unless AllowUserArguments=1. See "Command line and arguments" below.
AllowUserArguments DWORD Absent or 0 (default, locked) = a standard user cannot choose the arguments of the elevated app; only Arguments is used. 1 = the user's own command line is passed to the elevated app.
HashSHA SZ Optional 64-hex SHA-256 of the .exe. When present, the file is hash-checked before launch (tamper protection).
AllowChildElevation DWORD Child-elevation opt-in. Absent or 0 (default) = this app's child processes are relaunched non-elevated (default-deny; an elevated app is not a springboard for arbitrary elevated children). 1 = AEMS relaunches this app's direct children elevated. A child that is not itself an opt-in app is never elevated.
ChildInPlace DWORD 1.0.6.0+. Only together with AllowChildElevation=1. Absent or 0 (default) = children are blocked and relaunched as a separate copy, as in 1.0.5.0. 1 = the app's direct children start elevated in place, as real children. 2 = the whole tree below the app starts in place, up to 8 levels. See Children in place.
DoNotAllowChildElevateProccesses DWORD Deprecated for the child-elevation decision; AllowChildElevation now governs it. Still accepted and sent on the wire for back-compat.
GlobalApplication DWORD 1 = applies to all users on the machine.

A process is elevated-relaunched only if it is a top-level allow-listed app, or a direct child of a registered-ELEVATE parent. A child that is not itself an opt-in app is never elevated. Elevation only continues down a chain where every link is explicitly opted in (X opt-in launches C; C is elevated only if C is itself an allow-listed app with AllowChildElevation=1, and so on). A single non-opted-in app stops the chain. This describes entries without ChildInPlace. With ChildInPlace the children start as real children instead of copies; see Children in place.

Security warning. AllowChildElevation=1 makes an application a springboard: what it starts runs with administrator rights. Opt in only specific, trusted parent applications, and pin them with HashSHA or Publisher. A general shell or interpreter (cmd.exe, powershell.exe, pwsh.exe, wscript.exe, python.exe, ...), a terminal, or a program with an Open dialog or plugins can start any program. Opting such a program in is allowed, but it makes the user an administrator for as long as it runs: with AllowChildElevation=1 every program it starts directly is elevated, and with "Children in place" set to "Whole tree" every command the user types in an elevated shell is elevated too, up to 8 levels deep. There is no per-child allow-list or hash check for such children. Do this only where giving the user administrator rights for that session is acceptable (for example an elevated PowerShell for a support technician). Where a trusted program only needs specific tools, opt in that program and keep those tools in a folder that standard users cannot change.

The example file NetworkSettings.reg (provided by Logic Unknown ApS) holds ready-made elevated launchers (ncpa.cpl, services.msc, gpedit.msc, ...).

Example file NetworkSettings.reg (provided by Logic Unknown ApS)
Windows Registry Editor Version 5.00

; ============================================================================
; NetworkSettings.reg
; Publisher: Logic Unknown ApS - https://logic-unknown.com
; Documentation: https://docs.logic-unknown.com/aems/
;
; Example AEMS allow-list entries for running network configuration elevated.
;
; AEMS is a headless service: it transparently and silently elevates the
; applications listed here when a standard (non-admin) user on a kiosk device
; launches them. There is no GUI, tray menu, right-click item or confirmation
; prompt - elevation is governed solely by this allow-list and the hash check
; AEMSvc runs before each elevation.
;
; Allow-list hive (base):    HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\<Name>
; Policy override hive:      HKLM\SOFTWARE\Policies\Logic Unknown\AEMS\Applications\<Name>
;   (a complete Applications subtree under the Policies hive wins over the base)
; Since AEMS 1.0.6.0 the key is SOFTWARE\Logic Unknown\AEMS. For devices still on 1.0.5.0
; or earlier see "Upgrading from 1.0.5.0 or earlier" in the documentation (the upgrade
; migrates the legacy key).
;
; Per-app values:
;   FriendlyName                     REG_SZ     - label for audit/logging
;   DataPath                         REG_SZ     - full path to a PE .exe
;   Arguments                        REG_SZ     - command-line args (optional)
;   HashSHA                          REG_SZ     - 64-char hex SHA-256 of the .exe (optional tamper check)
;   AllowChildElevation              REG_DWORD  - 1 = relaunch this app's direct
;                                                 children elevated; absent/0 = deny (default)
;   DoNotAllowChildElevateProccesses REG_DWORD  - deprecated; AllowChildElevation now decides
;   GlobalApplication                REG_DWORD  - 1 = applies to all users
;
; When Arguments is non-empty, AEMS launches:  "<DataPath>" <Arguments>
; This is what lets you elevate .cpl applets through control.exe and .msc
; snap-ins through mmc.exe.
;
; Apply (elevated):   reg import NetworkSettings.reg
;                     Restart-Service AEMSvc
; AEMS reads its configuration only when the service starts (the license is
; the only value it re-reads while running). At scale, push via
; Intune/SCCM/RMM, or bake into a
; customer MSI with Build-MsiWithSettings.cmd.
; ============================================================================


; Network Connections (ncpa.cpl) -- the classic adapter list, fully elevated.
; control.exe loads ncpa.cpl in-process so the applet inherits the elevated
; token. Adapter IPs, DNS, protocols, etc. can be changed without UAC prompts.
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Network Connections]
"FriendlyName"="Network Connections (elevated)"
"DataPath"="C:\\Windows\\System32\\control.exe"
"Arguments"="ncpa.cpl"
"GlobalApplication"=dword:00000001


; Network and Sharing Center -- the higher-level networking page.
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Network and Sharing Center]
"FriendlyName"="Network and Sharing Center (elevated)"
"DataPath"="C:\\Windows\\System32\\control.exe"
"Arguments"="/name Microsoft.NetworkAndSharingCenter"
"GlobalApplication"=dword:00000001


; Control Panel home -- general fallback.
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Control Panel]
"FriendlyName"="Control Panel (elevated)"
"DataPath"="C:\\Windows\\System32\\control.exe"
"GlobalApplication"=dword:00000001


; ----------------------------------------------------------------------------
; Other useful elevated launchers using the same Arguments mechanism.
; Uncomment the ones you want and run reg import again.
; ----------------------------------------------------------------------------
;
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Programs and Features]
;"FriendlyName"="Programs and Features (elevated)"
;"DataPath"="C:\\Windows\\System32\\control.exe"
;"Arguments"="appwiz.cpl"
;"GlobalApplication"=dword:00000001
;
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Sound]
;"FriendlyName"="Sound (elevated)"
;"DataPath"="C:\\Windows\\System32\\control.exe"
;"Arguments"="mmsys.cpl"
;"GlobalApplication"=dword:00000001
;
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Internet Properties]
;"FriendlyName"="Internet Properties (elevated)"
;"DataPath"="C:\\Windows\\System32\\control.exe"
;"Arguments"="inetcpl.cpl"
;"GlobalApplication"=dword:00000001
;
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Services]
;"FriendlyName"="Services (elevated)"
;"DataPath"="C:\\Windows\\System32\\mmc.exe"
;"Arguments"="services.msc"
;"GlobalApplication"=dword:00000001
;
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Computer Management]
;"FriendlyName"="Computer Management (elevated)"
;"DataPath"="C:\\Windows\\System32\\mmc.exe"
;"Arguments"="compmgmt.msc"
;"GlobalApplication"=dword:00000001
;
; Note: a few classic .cpl applets redirect to the modern Settings UWP app on
; Win10/11 (e.g. desk.cpl, intl.cpl). Those lose elevation when the redirect
; happens, because UWP runs in AppContainer regardless of the launching token.
; ncpa.cpl, appwiz.cpl, mmsys.cpl, inetcpl.cpl, sysdm.cpl are still classic and
; elevate cleanly.


; ----------------------------------------------------------------------------
; To remove these entries:
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Network Connections" /f
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Network and Sharing Center" /f
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Control Panel" /f
; ----------------------------------------------------------------------------

Children in place

From AEMS 1.0.6.0 an approved application can start other programs elevated in place: as real child processes of the application, with their output, exit code and handle, so the application can wait for them. This is meant for wrapper programs that call other programs, setup programs that run a helper and wait for it, and scripts that run tools.

Without it (the behaviour of 1.0.5.0, still the default), AEMS stops every child of an elevated application when it is created (the application gets "Access is denied") and starts a separate copy of it: elevated with AllowChildElevation=1, unelevated otherwise. The application never sees the copy's output or exit code and cannot wait for it, and a console tool opens in a new window. Wrappers then fail or report a failure.

With ChildInPlace, AEMS checks each child while Windows creates it. A child that passes starts in place. A child that fails a check is not started at all: the application gets "Access is denied", and no copy starts.

Programs that finish very quickly

From 1.0.8.0 the user's own start of an allow-listed program no longer runs without administrator rights while AEMS decides. The driver holds the start for a moment (normally a few milliseconds, at most 1 second) until AEMS has suspended the new process, before its first instruction runs. Then the start completes normally for the program that started it, and the process stays suspended until AEMS has decided: it is ended and started again elevated, or resumed unchanged when it is not to be elevated (for example another user's start, or no valid license). A program that finishes very quickly therefore runs once, elevated. Starts that the event alone decides (a non-interactive session, a command line that is too long, a program that already runs elevated, no valid license) are not suspended at all.

One visible change: AEMS decides one launch at a time. When several allow-listed programs start at the same moment (for example a logon script that starts three tools), the later ones wait their turn suspended instead of running without administrator rights first. A program that waits for the started program to become ready (WaitForInputIdle) waits until AEMS has decided, as it waited for the elevated start before.

When a quick program can still run twice (from 1.0.8.0)

  • When the old driver is still loaded after the upgrade: the upgrade stops the old driver 1.0.6.0 and starts driver 1.0.8.0 at once. If the old driver is nevertheless still loaded after a completed upgrade (not expected: when the old driver cannot be unloaded, the upgrade fails and asks for a restart), AEMS behaves as 1.0.7.0 and logs warning 2236 once per service start. Restart the device.
  • When the hold timed out: AEMS did not suspend the new process within 1 second (for example the service was very busy or suspended). The start then continues without administrator rights as in 1.0.7.0, and warning 2235 names the program. After two such timeouts within 30 seconds the driver holds nothing for 30 seconds (the hold breaker), so a hung service delays launches by at most 2 seconds per 30 seconds.
  • When the suspend could not be checked (no thread found in the new process, or the process could not be opened): handled as in 1.0.7.0, warning 2235.
  • When AEMS is busy with one decision for more than 30 seconds (for example a hash check of a file on a slow disk): new launches are not suspended until that decision is done, so they do not wait behind it; warning 2235 ("the decision worker is busy") once for that period.

In these cases the 1.0.7.0 behaviour applies: the original start runs without administrator rights for a fraction of a second, and a wrapper that does its whole work in that time runs twice (measured with 1.0.6.0: a quick chain of four programs ran twice in 10 of 10 starts). If AEMSvc ends unexpectedly while a program is suspended, the driver ends that program; start it again.

The first fraction of a second (1.0.7.0, and from 1.0.8.0 the cases in the box above). When a standard user starts the allow-listed application, the user's own start runs un-elevated for the short time AEMS needs to decide, and is then ended and replaced by the elevated start. A wrapper can already start programs in that time. AEMS ends those un-elevated programs together with the original (event 1224), so they do not run twice; if it cannot check or end all of them it logs warning 2232. AEMS looks once (one snapshot of the running processes) and ends only processes in the original's process chain, in the same session and of the same user, not elevated, created after their parent and after the original, up to 8 levels and 64 processes. What remains: a program that already did its work in that fraction of a second, a program started after that one look, and programs that broke away from the original's process chain (for example started through another process, or after their own parent ended) are not ended. When the original had already exited before AEMS decided (event 1010), nothing is ended.

The machine-wide value EndOriginalDescendants (REG_DWORD, see the settings reference) switches this off: 0 = AEMS never ends those programs, as in 1.0.5.0, and logs event 1225 at service start. Set it to 0 only when a program that the application starts must not be interrupted in its first fraction of a second (for example a tool that changes something it cannot undo halfway). The cost: such a program then runs twice, once un-elevated from the user's original start and once from the elevated start.

The folder rule: read this first

A program is started in place only when it lies in a folder that standard users cannot change. The program file, its folder and every folder above it must be writable only by SYSTEM, Administrators or TrustedInstaller. Otherwise any user could replace the program and have it run with administrator rights.

  • C:\Program Files\... and C:\Windows\... qualify.
  • A folder created directly in the drive root does NOT qualify by default, for example C:\Contoso, even when an administrator or an installer created it. On a default Windows installation C:\ passes Modify for Authenticated Users on to every new folder below it. Wrapper programs and the programs they call often lie in exactly such a folder.

Harden such a folder once, from an elevated prompt. These are the same three commands as in "Check that the folder is trusted" under Wildcard path rules, with the folder name of the example:

icacls C:\Contoso
icacls C:\Contoso /inheritance:r /grant:r "*S-1-5-18:(OI)(CI)F" "*S-1-5-32-544:(OI)(CI)F" "*S-1-5-32-545:(OI)(CI)RX"
icacls C:\Contoso /setowner "*S-1-5-32-544" /T

The first command shows the current permissions. The second removes the inherited entries and grants SYSTEM and Administrators full control and Users read and execute. The third makes Administrators the owner of the folder and of everything in it. Subfolders and files inherit the hardened permissions, also the ones you add later; a file or subfolder that was given its own explicit permissions keeps them, so check it separately.

What this does to the folder:

  • Standard users can no longer write in C:\Contoso. If a program there writes its own log, settings or data files while it runs without elevation, give it a separate data subfolder that contains no programs. Only the folders that contain programs, and the folders above them, must be closed to users.
  • Other explicit entries stay. The second command replaces the entries of SYSTEM, Administrators and Users only. An explicit entry for any other account or group on the folder stays; the check below shows it. Remove it with icacls C:\Contoso /remove:g "<account>" and list the whole folder with icacls C:\Contoso /T (not measured).
  • Copy new programs into the folder, do not move them. A file moved from another folder on the same drive can keep its old owner and permissions. If you moved files, run the second and third command again.
  • Subfolders inherit. Subfolders and files created later in C:\Contoso get the hardened permissions automatically.

Check. Run icacls C:\Contoso again. Every line must name SYSTEM, Administrators or Users, and Users must have (RX) only:

C:\Contoso NT AUTHORITY\SYSTEM:(OI)(CI)(F)
           BUILTIN\Administrators:(OI)(CI)(F)
           BUILTIN\Users:(OI)(CI)(RX)

A subfolder shows the same entries marked (I) (inherited). An entry such as NT AUTHORITY\Authenticated Users:(OI)(CI)(M) or Everyone:(F) means the folder is still writable by users. The account names are shown in the language of Windows. To see the owners too, use the PowerShell loop under Wildcard path rules.

What you see when the folder is wrong. The program that should start in place does not start. The application that started it gets "Access is denied" (a console shows Access is denied.), no copy starts, and the Application log has a warning from source AEMS 2213 that reads Start of a child refused [PathGuard]: '<program>' ... and names the reason (for example WritableByOther with the account and the right). Harden the folder and start the application again. The folder is checked at every start, so a folder change needs no service restart.

An exact-path entry is not protected by the folder rule. AEMS checks the folder only for wildcard rules and for programs started in place. An application with an exact-path entry (DataPath without * or ?) starts elevated from any folder, also from one that standard users can change. In such a folder any standard user can replace the program, or put a library (DLL) next to it, and have their own code run with administrator rights. HashSHA on the entry stops a replaced program file, but not a planted library. Hardening the folder is therefore not only what makes the called programs start: it is what makes the entry safe at all. Harden the folder before you add the entry (see Folders of elevated programs).

The typical sign of a folder that is still open (measured): the wrapper starts elevated (event 1009), and every program it calls is refused with warning 2213, for example:

Start of a child refused [PathGuard]: 'C:\Contoso\tool.exe' (pid <n>), started by elevated pid <n>
in session 1, request <id>: [WritableByOther] the file 'C:\Contoso\tool.exe' grants
FILE_WRITE_DATA, FILE_APPEND_DATA, FILE_WRITE_EA, FILE_WRITE_ATTRIBUTES, DELETE to S-1-5-11
(NT AUTHORITY\Authenticated Users); only SYSTEM, BUILTIN\Administrators and NT SERVICE\TrustedInstaller
may modify it. Standard users can change the folder or file named above (typical for a folder
directly under C:\, such as C:\Contoso), so programs in it are not started elevated ...

The event names the file, the rights and the group. In addition AEMSvc logs warning 2233 once at every service start that names the exact-path entries on local fixed disks whose program or folder standard users can change. The entries keep working; the warning tells you which folders to harden. After the three commands above, the called program, a chain of three levels and a program in a subfolder start in place (measured).

Turn it on

Verify it with a standard user account. A launch by an administrator uses the administrator passthrough: the application and its children run with the administrator's own rights, AEMS does not check the children and writes no "started in place" events. Trying it with an administrator account therefore shows nothing about children in place.

  1. Put the application and the programs it calls in a folder that standard users cannot change (see the folder rule above).
  2. In the application's entry set AllowChildElevation=1 and ChildInPlace. In AEMSAllowlist.exe 1.3.0.0: check Allow child elevation, then choose Children in place: "Off", "Direct children start in place" or "Whole tree starts in place (up to 8 levels)".
  3. Restart the AEMS service (Restart-Service AEMSvc): settings are read at service start, so a changed entry takes effect at the next service start. Children in place need the driver from AEMS 1.0.6.0 or later; an upgrade loads the new driver at once. If warning 2220 says that the loaded driver is the old one, restart the device.
  4. Start the application as a standard user (see above). For each program started in place the Application log has information event 1200 that reads Child '<program>' (pid <n>) of pid <n> started in place, elevated ...; many starts of one application within a minute are summarised in event 1202. How to read the event text: Reading AEMS events.

Example: a wrapper in C:\Contoso that calls other programs, which may call further programs:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Contoso wrapper]
"FriendlyName"="Contoso wrapper"
"DataPath"="C:\\Contoso\\wrapper.exe"
"HashSHA"="0000000000000000000000000000000000000000000000000000000000000000"
"AllowChildElevation"=dword:00000001
"ChildInPlace"=dword:00000002
"GlobalApplication"=dword:00000001

Replace the hash with the SHA-256 of the real wrapper.exe (or use Publisher instead when the wrapper is signed).

Which setting.

Setting Value What starts in place
Off 0 or absent Nothing. Children are blocked and relaunched as a copy, exactly as in 1.0.5.0.
Direct children 1 The programs the application starts itself. What those programs start is refused (no copy), unless that program has its own entry with AllowChildElevation=1 and ChildInPlace.
Whole tree 2 Every program below the application, up to 8 levels deep. None of them needs its own allow-list entry. A program deeper than 8 levels is refused.

Use "Whole tree" for a wrapper that calls programs which may call further programs (for example a wrapper that runs cmd /c, a script, or a setup program that runs its own helpers). Use "Direct children" when the application only starts programs that start nothing themselves. ChildInPlace has no effect without AllowChildElevation=1; AEMS then treats it as off and logs warning 2230 at service start that names the entry. The same happens for a value other than 0, 1 or 2, or a value that is not a DWORD.

A program in the tree that has its own allow-list entry follows that entry's rules. The refusing rows win, in this order: a refusing entry, then HashSHA, then locked arguments.

The child's own entry Result
none Starts in place under the application's setting.
without AllowChildElevation=1, or with a Publisher or PublisherThumbprint pin Starts in place; what it starts is refused (the chain ends there). The pin itself is not checked for an in-place start; the folder rule is what protects the file.
AllowChildElevation=1 without ChildInPlace Starts in place; what it starts is refused.
AllowChildElevation=1 and ChildInPlace, no publisher pin Starts in place; from there its own setting applies, and the 8 levels count again from it.
locked arguments (AllowUserArguments absent or 0) Starts only when its command line after the program name equals the entry's Arguments exactly (leading and trailing blanks ignored; both empty counts as equal). Otherwise refused [ArgumentsLocked]. Locked arguments stay locked in place.
with HashSHA Refused in place (from 1.0.6.0) [HashedEntryNoPrecompute]. Remove the hash from the child's entry, or leave the child without an entry of its own.
a refusing entry (malformed pin, inactive wildcard rule) Refused [PathGuard]; the event text ends with own entry '<name>' and names no folder. Fix that entry (see warning 2012).

What is refused in place. Each refusal means: the program is not started, the application that started it gets "Access is denied", no copy starts, and AEMS logs a warning that names the program and the reason in square brackets.

Situation What the user sees What you can do
The program lies in a folder that standard users can change: the user's %TEMP%, Downloads, Desktop or profile, a folder under C:\ProgramData that users can write, or a folder directly in the drive root with its default permissions [PathGuard] The application reports a failed start or "Access is denied". Harden the folder (above) or install the program under C:\Program Files.
An installer or setup program unpacks a helper into the user's %TEMP% and starts it (self-extracting installers, many bootstrappers) [PathGuard] The setup fails or reports an error. Documented limit (from 1.0.6.0): leave "Children in place" off for that entry. The helper is then blocked and relaunched as a copy, as in 1.0.5.0.
The program is started through a drive letter created with subst or another alias letter, through a symbolic link or a junction (for example a Java javapath folder, the winget Links folder or a Scoop current folder) [PathAlias] The application reports a failed start or "Access is denied". Start the program by its real long path on a local drive.
The program is started by its 8.3 short name (C:\PROGRA~1\...) [PathGuard], detail [NotCanonical] (not measured) The application reports a failed start or "Access is denied". Start the program by its long path.
The program lies on a mapped network drive, on a UNC path (\\server\share\...), on removable media such as a USB stick, or in a mounted ISO [VolumeNotFixed] The application reports a failed start or "Access is denied". Copy the program to a protected folder on a local fixed drive.
The program lies on a volume that is not NTFS (ReFS, Dev Drive, FAT, exFAT) [FileIdentity] The application reports a failed start or "Access is denied". Move the program to an NTFS volume.
The program is on a drive letter that the user mapped or created with subst Not found. An elevated program does not see the user's own mapped network drives or subst letters at all. Use a real local path, or a drive letter that is defined for the whole machine.
A Chromium-based browser, an Electron program or a program that hosts Edge WebView2 starts its sandboxed helper processes The program starts, but its helpers do not: blank windows, or the program exits. Do not use "Children in place" for such programs.
The application has more than 6 child starts waiting for AEMS at the same moment The extra start gets "Access is denied". Starts are refused, not queued; the application can retry. Most wrappers start one program at a time and are not affected.
The tree is deeper than 8 levels (with "Direct children": deeper than 1 level) The deeper program does not start. Use "Whole tree", or give the program at the deepest working level its own entry with ChildInPlace.
The application was started before the AEMS service was last restarted [CreatorNotHeld] The programs it starts are refused. Close the application and start it again.
The AEMS service is stopped or restarting Programs that in-place applications start do not start. Wait for the service; start the application again after a restart.

Packaged apps and tools that a program finds by name on the user's own PATH (for example the WindowsApps aliases in the user's profile) lie in user folders or are reached through links, so they are expected to be refused in place (not measured).

When "Children in place" is configured but cannot work. If at least one entry has ChildInPlace but in-place children cannot start, AEMSvc logs warning 2220 "Children in place (ChildInPlace) is configured for ... but is not active: ..." once at service start, and again when the state changes (event 1222 when it is active again). The reason is one of: the loaded AEMS driver is the old one (restart the device; the upgrade normally loads the new driver at once), AEMS has no valid license (event 3013), or the service could not connect to the driver. For the reasons old driver and connection not ready, those entries behave like AllowChildElevation=1 without ChildInPlace: children are blocked and relaunched as an elevated copy, and AEMS logs warning 2225 for each launch. When AEMS has no valid license nothing is elevated at all (event 2011).

What does not change. Entries without ChildInPlace (also with AllowChildElevation=1) handle child processes exactly as in 1.0.5.0. Top-level elevation, administrator passthrough, wildcard rules, licensing and TamperProtection are not affected by the setting.

Speed. Each child waits while AEMS checks it, at most 2 seconds. In a measurement on a virtual machine, a short console command (cmd /c exit 0) started in place took as long as without the check (median about 33 ms), and 50 starts in a row ran without a timeout.

Wrapper patterns measured with "Whole tree": a program called directly, through cmd /c, through powershell -File, a GUI program that starts a console program, and a chain of three levels. Each called program ran exactly once, elevated (for the quick-program limit see the note at the top of this section).

Security consequences and the limits that cannot be closed: Children in place. Problems: A child program does not start in place.

Command line and arguments

From driver protocol 2 (AEMS.msi 1.0.3.0) the driver forwards the full command line of every caught launch. What the elevated relaunch gets depends on who launched it:

Relaunch Command line used Why
Standard user, entry locked (default) "<DataPath>" <Arguments>, or no arguments - exactly as 1.0.2.0 A standard user must not choose what an elevated app runs.
Standard user, entry has AllowUserArguments=1 the user's command line verbatim; Arguments only when the user gave none Explicit administrator decision per app.
Administrator (passthrough, incl. runas with an admin account) the original command line verbatim; Arguments only when none The administrator already owns the machine.
Governed child, default-deny (relaunched non-elevated) the child's own command line The child runs unelevated, as the user, so its arguments grant nothing.
Governed child of an opt-in parent (AllowChildElevation=1, relaunched elevated) the child's own command line Opting a parent in is already the explicit administrator decision to elevate what it launches, with the arguments it launches it with.
Child started in place (ChildInPlace) the command line, working directory and environment the parent chose; nothing is relaunched The child is the parent's real child. If the child has its own entry with locked arguments, it starts only with exactly those arguments (see Children in place).

Event 1009 for a top-level relaunch ends with (arguments: configured) or (arguments: user). A command line longer than 2047 characters is never relaunched truncated: a top-level launch is left running unelevated (event 2004), a governed child is not relaunched (event 3009). The working directory is the application's own folder.

Security warning for AllowUserArguments=1. Set it only for applications whose command line cannot be turned into arbitrary elevation. Never set it on a host that executes what its arguments name (cmd.exe, powershell.exe, mmc.exe, rundll32.exe, regedit.exe, script hosts, ...): an allow-listed mmc.exe with user arguments elevates any .msc the user names, and cmd.exe elevates cmd /c <anything>. Prefer a locked entry with fixed Arguments, pinned with HashSHA. On an unlocked entry argv[0] (the program name inside the command line) is also chosen by the user, so the application must not trust argv[0] to locate itself, its plugins or its DLLs (some Python, Java and Electron launchers and installers do). Locked entries are safe: AEMS always builds "<DataPath>" <Arguments> itself.

Wildcard path rules

From AEMS 1.0.6.0 an entry can approve an executable by a path pattern instead of one exact path, so you do not need to know the exact file name (or its hash) in advance, for example a vendor's versioned setup program. The exact rules are in the Settings reference - Wildcard path rules; the short version:

  • An entry is a wildcard rule when DataPath contains * or ?.
  • ? is one character, * is any number of characters, and neither ever matches a \: a wildcard stays inside one folder name or the file name. The pattern must match the whole path (case-insensitive).
  • The pattern is a local path (C:\...), the drive and the first folder are literal, the file name ends with .exe, the whole pattern is at most 251 characters, GlobalApplication is 1, and Publisher or HashSHA is set. A rule that breaks one of these is rejected at service start (warning 2012) and does nothing; so is any entry with a missing or empty DataPath. A malformed HashSHA (not 64 hex digits) or PublisherThumbprint (not 40 hex digits), on any entry, is different: the entry is kept in its place as a refusing entry (2012 once at start), and every launch it matches is refused with 2013 [MalformedRule], so a later, broader entry cannot elevate the same file without the pin. Correct the value and restart the AEMSvc service.
  • At launch AEMS checks two guards on the concrete file before it elevates:
  • trusted location: a fixed drive on an accepted storage bus, a global drive letter, no junctions or symbolic links in the path, and the file and every folder above it owned by and writable only by Administrators, SYSTEM or TrustedInstaller;
  • identity: a valid embedded Authenticode signature from Publisher (plus PublisherThumbprint when set), and/or the SHA-256 in HashSHA.

If a guard fails, the user's program runs unelevated and AEMS logs warning 2013 with the reason. The guards protect top-level launches and a child's own rule, not the children of a parent with AllowChildElevation=1 and no ChildInPlace (children started in place always get the folder check, see Children in place): such a parent elevates its direct children whatever rule they match (a child that fails a Publisher, thumbprint or location check loses only its own entry's settings). A child whose file fails its own entry's hash, or whose entry is malformed or an inactive wildcard rule, is not started at all. When the launching user is an administrator, a failed check does not block: AEMS relaunches the app with the administrator's own real token and logs warning 2016. - Limits you should know before you rely on wildcard rules: - the storage check is by bus. Removable media and disks on the USB, FireWire (1394), SD, MMC (eMMC), SSA, iSCSI, Fibre Channel, virtual or unknown buses (including mounted VHD/VHDX files) are refused, and so are a volume that cannot be queried and drive letters created for one user (subst, mapped drives). Disks on an accepted bus (SATA, SAS, SCSI, ATA/ATAPI, NVMe, RAID, Storage Spaces, SCM, UFS) are accepted even when they are attached externally, for example an eSATA or Thunderbolt/USB4 NVMe enclosure, external SAS, or a Storage Spaces pool built on USB disks: they are not detected as external. Point wildcard rules at the system drive; - a DELETE right on a volume root is ignored, so the default root of a data volume such as D:\ does not block a rule; every other right on the root still counts; - certificate revocation is not checked online (local cache only), so a revoked certificate may still be accepted. PublisherThumbprint or HashSHA is the strict option; - Publisher compares the certificate's common name only; - a launch can be delayed, or refused, while another process holds the file open. - AEMS elevates a matching file when a user launches it. Nothing happens when a file merely appears in the folder. - Wildcard rules need the driver from AEMS 1.0.6.0 (driver 1.0.6.0, protocol 0x00020003; wildcard matching needs protocol 0x00020002 or later). The upgrade loads the new driver at once; if 2014 or 3011 shows that the old driver is still loaded, restart the device, and again if it is still logged. With an older driver AEMS logs warning 2014 once at start and never elevates through wildcard rules; a launch that a wildcard rule matches first is refused (2013 [WildcardInactive], administrators 2016), even when a later entry would match it; other exact entries keep working. If 2014 is still logged after the reboot, the installed package does not contain driver 1.0.3.0 or later: install the current AEMS MSI (1.0.8.0) from Logic Unknown ApS.

Example 1 - a vendor setup program with a changing version in the name, pinned by publisher. Elevates setup_2.4.1.exe, setup_x64.exe, and so on, in that one folder only:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Contoso setup]
"FriendlyName"="Contoso setup (any version)"
"DataPath"="C:\\Program Files\\Contoso\\Tools\\setup_*.exe"
"Publisher"="Contoso Ltd"
"GlobalApplication"=dword:00000001

Example 2 - one program in a versioned folder, pinned by publisher and certificate thumbprint. Matches C:\Program Files\Fabrikam\Console 7.2\console.exe and ...\Console 8.0\console.exe, but not ...\Console 10.1\console.exe (? is exactly one character) and not ...\Console 7.2\bin\console.exe (no folder crossing):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Fabrikam console]
"FriendlyName"="Fabrikam console"
"DataPath"="C:\\Program Files\\Fabrikam\\Console ?.?\\console.exe"
"Publisher"="Fabrikam, Inc."
"PublisherThumbprint"="0123456789ABCDEF0123456789ABCDEF01234567"
"GlobalApplication"=dword:00000001

Both are in the example file WildcardRules.reg (provided by Logic Unknown ApS). Replace the vendor names and the thumbprint with the real values. AEMSAllowlist.exe 1.3.0.0 (the tool for AEMS 1.0.6.0) writes such entries for you and validates them with the same rules.

Example file WildcardRules.reg (provided by Logic Unknown ApS)
Windows Registry Editor Version 5.00

; ============================================================================
; WildcardRules.reg
;
; Example AEMS wildcard path rules (AEMS 1.0.6.0 and later).
; Publisher: Logic Unknown ApS - https://logic-unknown.com
; Documentation: https://docs.logic-unknown.com/aems/
;
; A wildcard rule approves an executable by a path PATTERN instead of one exact
; path. An entry is a wildcard rule when DataPath contains * or ?.
;   ?  matches exactly one character that is not a backslash
;   *  matches zero or more characters that are not a backslash
;   Wildcards never cross a folder boundary; the pattern must match the WHOLE
;   path (case-insensitive).
;
; Rules (an entry that breaks one is rejected at service start, with a warning):
;   - local path X:\... with a literal drive letter (no UNC, \\?\ or devices)
;   - the drive and the first folder are literal; no file directly in X:\
;   - no / " < > |, control characters or a second colon; no empty, . or ..
;     folder component
;   - the file name ends with the literal .exe
;   - at most 251 characters (refused, never truncated)
;   - Publisher or HashSHA is set, and GlobalApplication = 1
; A malformed HashSHA (not 64 hex digits) or PublisherThumbprint (not 40 hex
; digits) does not drop the entry: it is kept as a refusing entry (warning
; 2012) and every launch it matches is refused (2013 [MalformedRule]).
; Use a folder under C:\Program Files: a new folder directly in the drive root
; (for example C:\Tools) normally lets users write and fails the check below.
;
; At launch AEMS elevates a matching file only when BOTH guards pass:
;   1. trusted location: a fixed drive on an accepted storage bus (removable
;      media and USB, FireWire, SD/eMMC, iSCSI, Fibre Channel and mounted
;      virtual disks are refused; the check is by bus, so an external NVMe or
;      eSATA enclosure is NOT detected - use the system drive) with a global
;      drive letter
;      (a drive letter created or redirected for one user, for example with
;      subst or a mapped drive, is refused), no junction/symbolic link in the
;      path, the file and every folder above it owned by and writable only by
;      Administrators, SYSTEM or TrustedInstaller;
;   2. identity: valid EMBEDDED Authenticode signature whose leaf certificate
;      CN equals Publisher (and SHA-1 thumbprint equals PublisherThumbprint
;      when set), and/or SHA-256 equals HashSHA.
; Otherwise the program runs unelevated and AEMS logs a warning with the
; reason. Elevation happens when a user launches the file, never when a file
; merely appears in the folder.
;
; New per-app values:
;   Publisher            REG_SZ - leaf certificate CN of the embedded signature
;   PublisherThumbprint  REG_SZ - optional SHA-1 thumbprint (40 hex) of that
;                                 certificate, checked in addition to Publisher
;
; Requires the AEMS 1.0.6.0 driver (protocol 0x00020002), started by the
; upgrade (reboot if warning 2014 says the old driver is still loaded). Contoso and Fabrikam are placeholder vendors: replace the
; paths, the publisher names and the thumbprint with the real values
; (Get-AuthenticodeSignature, or "Read from file..." in AEMSAllowlist.exe).
;
; Apply (elevated):   reg import WildcardRules.reg
;                     Restart-Service AEMSvc
; Details: https://docs.logic-unknown.com/aems/configure/ (Wildcard path rules).
; ============================================================================

; Example 1 - a vendor setup program with a changing version in the file name,
; pinned by publisher. Matches C:\Program Files\Contoso\Tools\setup_2.4.1.exe
; and setup_x64.exe; does not match C:\Program Files\Contoso\Tools\old\setup_1.exe.
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Contoso setup]
"FriendlyName"="Contoso setup (any version)"
"DataPath"="C:\\Program Files\\Contoso\\Tools\\setup_*.exe"
"Publisher"="Contoso Ltd"
"GlobalApplication"=dword:00000001

; Example 2 - one program in a versioned folder, pinned by publisher and
; certificate thumbprint. Matches ...\Console 7.2\console.exe and
; ...\Console 8.0\console.exe; not ...\Console 10.1\console.exe (? is exactly
; one character). The thumbprint changes when the vendor renews its
; certificate; leave PublisherThumbprint out to survive renewals.
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Fabrikam console]
"FriendlyName"="Fabrikam console"
"DataPath"="C:\\Program Files\\Fabrikam\\Console ?.?\\console.exe"
"Publisher"="Fabrikam, Inc."
"PublisherThumbprint"="0123456789ABCDEF0123456789ABCDEF01234567"
"GlobalApplication"=dword:00000001

; ----------------------------------------------------------------------------
; Example 3 (commented out) - a file that is only catalog-signed or unsigned
; cannot satisfy Publisher; pin its SHA-256 instead. The rule then elevates
; only files with exactly this content.
; ----------------------------------------------------------------------------
;[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Contoso updater]
;"FriendlyName"="Contoso updater"
;"DataPath"="C:\\Program Files\\Contoso\\Updater\\update*.exe"
;"HashSHA"="0000000000000000000000000000000000000000000000000000000000000000"
;"GlobalApplication"=dword:00000001

; ----------------------------------------------------------------------------
; To remove these entries:
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Contoso setup" /f
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Fabrikam console" /f
; ----------------------------------------------------------------------------

Find the publisher name and thumbprint. Use a sample of the signed file:

  • Explorer: right-click the file -> Properties -> Digital Signatures. The "Name of signer" is the Publisher value. Select it -> Details -> View Certificate -> Details -> Thumbprint for PublisherThumbprint (remove the spaces). If there is no Digital Signatures tab, the file has no embedded signature.
  • PowerShell:
$s = Get-AuthenticodeSignature 'C:\Program Files\Contoso\Tools\setup_2.4.1.exe'
$s.Status                                        # must be Valid
$s.SignatureType                                 # Authenticode = embedded signature; if it shows
                                                 # Catalog, check the Digital Signatures tab
$s.SignerCertificate.GetNameInfo('SimpleName', $false)   # -> Publisher
$s.SignerCertificate.Thumbprint                  # -> PublisherThumbprint
  • AEMSAllowlist.exe: Read from file... next to Publisher fills both from the file's embedded signature.

An embedded Authenticode signature is required. A file that is only catalog-signed (no Digital Signatures tab) does not qualify for Publisher; pin its HashSHA instead. PowerShell reports Catalog for some files that have both kinds of signature; such a file qualifies.

A thumbprint changes when the vendor renews its certificate; Publisher alone survives a renewal. Pin the thumbprint only when you accept updating the rule at each renewal.

Check that the folder is trusted. The file and every folder from the drive root down to it must be writable only by administrators. C:\Program Files\... and C:\Windows\... normally pass; folders under C:\Users\..., C:\ProgramData\... (by default users can create files there) and %TEMP% fail.

A new folder directly in the drive root fails too, even when an administrator or an installer created it: on a default Windows installation C:\ passes Modify for Authenticated Users on to every new folder below it (for example C:\Contoso). Put the files in a folder under C:\Program Files. If a folder in the drive root is required, inspect it and then remove the inherited entries and grant only administrators and SYSTEM full control and users read and execute:

icacls C:\Contoso
icacls C:\Contoso /inheritance:r /grant:r "*S-1-5-18:(OI)(CI)F" "*S-1-5-32-544:(OI)(CI)F" "*S-1-5-32-545:(OI)(CI)RX"
icacls C:\Contoso /setowner "*S-1-5-32-544" /T

(S-1-5-18 = SYSTEM, S-1-5-32-544 = Administrators, S-1-5-32-545 = Users; the SIDs work on every Windows language. The owner step is needed when a user created the folder or a file in it.)

List the owner and allow entries of the file and of each folder above it:

$f = 'C:\Program Files\Contoso\Tools\setup_2.4.1.exe'
$acl = Get-Acl -LiteralPath $f
'{0}  owner={1}' -f $f, $acl.Owner
$acl.Access | Where-Object { $_.AccessControlType -eq 'Allow' } |
    Format-Table IdentityReference, FileSystemRights, PropagationFlags -AutoSize
$p = Split-Path -Path $f -Parent
while ($p) {
    $acl = Get-Acl -LiteralPath $p
    '{0}  owner={1}' -f $p, $acl.Owner
    $acl.Access | Where-Object { $_.AccessControlType -eq 'Allow' } |
        Format-Table IdentityReference, FileSystemRights, PropagationFlags -AutoSize
    $p = Split-Path -Path $p -Parent
}

Any allow entry for a SID other than NT AUTHORITY\SYSTEM, BUILTIN\Administrators or NT SERVICE\TrustedInstaller that grants Write, Modify, FullControl, Delete, ChangePermissions or TakeOwnership on the file or its folder (on higher folders: Delete, delete-subfolders-and-files, ChangePermissions, TakeOwnership) makes the check fail. icacls <folder> shows the same information. Rows with PropagationFlags InheritOnly do not count for the folder they are listed on (this is the normal state of C:\). Junctions and symbolic links in the path also fail; use the real path.

Troubleshooting by event ID (Application log, source AEMS):

Event What it means What to do
2012 (warning, at start) A wildcard rule that breaks a rule, or an entry with a missing or empty DataPath, was dropped; or an entry with a malformed HashSHA or PublisherThumbprint was kept as a refusing entry. The text names the entry and the rule it breaks. Fix the pattern (literal drive and first folder, no / " < > \| or empty, . or .. component, .exe at the end, at most 251 characters), add Publisher/HashSHA, correct a malformed HashSHA (64 hex) or PublisherThumbprint (40 hex), set GlobalApplication=1, then Restart-Service AEMSvc.
2013 (warning, at launch) A launch matched the rule but a guard failed, so the rule did not elevate it. A top-level program ran unelevated. For a child: with HashMismatch, HashFailed, MalformedRule or WildcardInactive the child was NOT started at all; otherwise the text ends with "relaunched UNELEVATED" (its parent does not allow child elevation) or "IS still relaunched elevated ... by design" (its parent has AllowChildElevation=1). WildcardInactive = the loaded driver is older than the one shipped in 1.0.6.0 (see 2014). Codes: MalformedRule = the entry's HashSHA or PublisherThumbprint is malformed (see 2012); RemovableVolume = the device reports removable media, or the disk is on a refused storage bus (the text names it: USB, 1394 (FireWire), SD, MMC, SSA, Fibre Channel, iSCSI, virtual or file-backed virtual such as a mounted VHD, VHDX or ISO, unknown); NotFixedVolume naming the "original's logon session" or the "logon session of the elevated process" = the drive letter is redirected for that user (for example by subst or a per-user mapping). The text names the image, the entry and the reason: which folder, SID and right; owner; reparse point; drive type or alias; file open for writing; short or non-canonical path; or the signature problem (no embedded signature, untrusted, wrong publisher, wrong thumbprint, hash mismatch). Fix the folder permissions (see "Check that the folder is trusted"), use the real (non-junction) long path instead of an 8.3 short path, retry after a copy into the folder has finished, move the file to the system drive (RemovableVolume), use a real local path instead of a redirected drive letter (NotFixedVolume), or correct Publisher/PublisherThumbprint/HashSHA and restart AEMSvc (MalformedRule).
2016 (warning, at launch) ADMINISTRATOR OVERRIDE: a guard failed, but the user is an administrator, so the app was relaunched elevated with the administrator's own real token. Fix the rule or the folder as for 2013; a standard user would have been refused.
2003 (warning, at launch) The driver caught the launch but AEMS found no matching entry (or, for an administrator, the file does not match HashSHA). Standard user: NOT elevated, the program keeps running unelevated (followed by 2004). Administrator: relaunched with the administrator's own real token (passthrough). Child of a governed parent: relaunched with child elevation denied. Use the AEMS driver and service from the same MSI, and check that DataPath matches the path.
2014 (warning, at start) The loaded driver predates wildcard support; wildcard rules are not active: they never elevate, and launches they match first are refused (2013 [WildcardInactive]). Install the current AEMS MSI; its upgrade normally unloads the old driver and starts the new one. If 2014 is still logged after that, the old driver is still loaded: reboot. If it stays after the reboot, the installed package does not contain driver 1.0.3.0 or later: install the current AEMS MSI (1.0.8.0) from Logic Unknown ApS.
5000 (error) Unexpected error; AEMSvc may have stopped itself after an internal safety failure. If AEMSvc ends unexpectedly, Windows restarts it automatically after 5 seconds, twice; after a third failure within a day it stays stopped. Event 5000 is in the Application log (source AEMS); the restarts and the final stop appear as Service Control Manager events in the System log. If AEMSvc stays stopped, start it manually (Start-Service AEMSvc) and contact support.
3009 (error, at launch) Elevation failed; the text names the step. For a standard user and a hash-only entry: the file no longer matches HashSHA ("refusing to relaunch", followed by 2004). After a vendor update, set the new HashSHA and restart AEMSvc; otherwise investigate the file. For other steps see the event reference.
1009 (information) The launch was elevated; the text names the rule. Nothing.
no event The launch did not match any rule (the driver did not catch it). Compare the full path with the pattern: * and ? never match \, and the whole path must match. Use Test against a file... in AEMSAllowlist.exe.

Administrator users

When the console user is a local administrator (directly, or through a nested local or domain group that is a member of the local Administrators group), AEMS behaves like "Run as administrator" without the consent prompt:

  • the allow-listed app is relaunched with the user's real full token (the UAC linked token, or the user's own token when UAC is off), not a token built by AEMS;
  • the relaunch is not registered for child governance, so every child process inherits that real token untouched (no deny, no de-elevation, no loss of arguments). Exception: if the child's own image path is itself an allow-listed path, the driver still intercepts it as a top-level launch and the relaunch gets only that entry's configured Arguments.

The decision is made only from what Windows put in the user's logon token (BUILTIN\Administrators enabled and the token elevated). A standard user cannot opt in, and an administrator gets nothing they could not already get by accepting a UAC prompt. Standard users are unaffected: they keep the kiosk model (AEMS-built elevated token + default-deny child governance).

The HashSHA pin is informational for administrators and enforced for standard users: if an administrator has updated an allow-listed app, the relaunch still happens with the administrator's real token (warning 2003 asks you to update HashSHA; for an entry with Publisher, PublisherThumbprint or a wildcard rule the warning is 2016), while a standard user is refused on any hash mismatch: for a hash-only entry that is error 3009 ("On-disk hash ... no longer matches the configured HashSHA; refusing to relaunch") followed by 2004, for an entry with Publisher, PublisherThumbprint or a wildcard rule it is 2013 [HashMismatch].

The event log shows the path taken. Event 1009 for an administrator ends with [administrator passthrough: real token, child governance off].

Setting (service-wide, read at service start, Policies hive wins):

Value Type Meaning
AdminPassthrough DWORD Under HKLM\SOFTWARE\Logic Unknown\AEMS or HKLM\SOFTWARE\Policies\Logic Unknown\AEMS. Absent or any non-zero value (default 1) = administrator passthrough on. 0 = off: administrators are treated exactly like standard users.

Other accounts, "Run as different user" and "Run as administrator" (driver protocol 2)

From AEMS.msi 1.0.3.0 the decision is made from the token of the process that was actually launched, not from whoever is signed in at the console:

How the allow-listed app was started What AEMS does
"Run as administrator" (any admin account), or by an administrator with UAC off, or by SYSTEM Nothing. The process already runs elevated; the driver does not catch it, no event.
"Run as different user" / runas with a local administrator account Relaunched with that account's real full token in the same session, child governance off (event 1009 [administrator passthrough ...]).
By the console user (standard user) Kiosk path: AEMS-built elevated token, default-deny child governance, HashSHA enforced (event 1009).
"Run as different user" with another standard account, or from a non-interactive session Left running unelevated with its own token, untouched (event 2004 "left running unelevated"). AEMS never elevates an identity it cannot vouch for.

The original is no longer killed before AEMS has decided: it runs with the launching user's own token for the few milliseconds the decision takes, and is terminated only when an elevated relaunch replaces it (the relaunch waits up to 2 seconds for the original to exit, so single-instance apps do not see their predecessor). If AEMSvc is stopped or crashes, every launch it has not decided keeps running unelevated.

With AdminPassthrough=0, "Run as different user" with an administrator account is treated like any other non-console identity: it is left running unelevated (event 2004), not relaunched. The administrator relaunch also loads that account's user profile so HKCU stays available after the original is replaced. Note that a "Run as different user" administrator window left open on the kiosk desktop lets whoever is at the keyboard start allow-listed apps elevated without a prompt; sign such windows out after use.

Audit

Every elevation and service lifecycle event is written to the Windows Application event log under source AEMS (Event Viewer -> Windows Logs -> Application). There is no network, cloud, remote-logging or portal dependency. Collect these centrally with your existing event forwarding / SIEM pipeline if required.

Allow-list Tool (AEMSAllowlist.exe)

AEMSAllowlist.exe is a small, portable Windows tool that creates AEMS allow-list registry entries one application at a time. It writes a regedit .reg file and, if you choose, imports it into the registry.

It is provided by Logic Unknown ApS separately from the MSI. It is not part of AEMS.msi, is not installed under C:\Program Files\AEMS, and AEMSvc has no knowledge of it. Copy the single exe anywhere (USB stick, Downloads) and run it; no installer and no files beside it are needed.

Publisher: Logic Unknown ApS (https://logic-unknown.com). The "Documentation" link at the bottom left of the window opens this documentation (https://docs.logic-unknown.com/aems/).

Version 1.3.0.0 (AEMS 1.0.6.0) adds wildcard path rules, the Publisher / PublisherThumbprint values (see "Wildcard path rules" below) and the "Children in place" choice (ChildInPlace, see Children in place). These need the AEMS 1.0.6.0 service and driver or later (AEMS 1.0.8.0: AEMSvc 0.1.9.0, driver 1.0.8.0) and, for children in place, a valid license or the upgrade grace; an older service ignores the new values and treats a pattern as a literal path that never matches.

Version 1.3.0.0 is the tool that ships with AEMS 1.0.6.0. It writes the Logic Unknown key path below. It is for AEMS 1.0.6.0 and later; AEMS 1.0.5.0 and earlier read a different (legacy) key, so use AEMSAllowlist 1.0.x for those devices or upgrade them first (see Upgrading from 1.0.5.0 or earlier). A .reg file saved by AEMSAllowlist 1.0.x names the legacy key and is not accepted by --apply; recreate the entries with this version.

Rollout order: upgrade a device to AEMS 1.0.6.0 FIRST, then use this version on it. --apply accepts the new key whatever AEMS version is installed, so running it on a device that still runs 1.0.5.0 creates HKLM\SOFTWARE\Logic Unknown\AEMS early. The 1.0.6.0 MSI then merges the legacy settings into that pre-created key (values and allow-list entries it lacks; the entries the tool wrote win), but a 1.0.5.0 device ignores the new key until it is upgraded.

What the tool writes

One key per entry under the hive you select:

  • Base (default): HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\<Name>
  • Policy: HKLM\SOFTWARE\Policies\Logic Unknown\AEMS\Applications\<Name>
Value Type Written when
FriendlyName REG_SZ always (defaults to the file description, else the file name)
DataPath REG_SZ always; full path to the exe, or a wildcard pattern; never empty
Arguments REG_SZ always ("" when empty)
HashSHA REG_SZ only when "Pin SHA-256 hash" is checked (64 uppercase hex)
Publisher REG_SZ only when the Publisher box is filled (leaf certificate CN, trimmed)
PublisherThumbprint REG_SZ only when the Thumbprint box is filled (40 uppercase hex, SHA-1)
GlobalApplication REG_DWORD always; 1 when "Applies to all users" is checked (default)
AllowChildElevation REG_DWORD always; 1 when "Allow child elevation" is checked, else 0
AllowUserArguments REG_DWORD always; 1 when "Allow user arguments" is checked, else 0
ChildInPlace REG_DWORD always; 0 = Off, 1 = Direct children, 2 = Whole tree. The choice is available only while "Allow child elevation" is checked; clearing that check sets it back to Off.

Because Arguments, AllowChildElevation, AllowUserArguments and ChildInPlace are always written, importing an entry over an existing key of the same name replaces a stale value. Pins (HashSHA, Publisher, PublisherThumbprint) are written only when set, so an import never removes a pin that is already in the key; delete the entry first to remove a pin. The tool never lists or deletes existing entries, and never writes service-wide values (LogLevel, AdminPassthrough) or the deprecated DoNotAllowChildElevateProccesses. The default is path-only matching; the hash is opt-in.

When "Children in place" is set, Add to list shows warnings before it adds the entry: helpers started from the user's TEMP folder are refused and no copy starts; what "Direct children" or "Whole tree" covers; locked arguments stay locked; and the setting needs AEMS 1.0.6.0 with its driver active and a valid license (or the upgrade grace). For a children-in-place entry the warning dialog defaults to No.

The .reg file is UTF-16 LE with BOM and CRLF line endings, starts with Windows Registry Editor Version 5.00, and has the same shape as the example file ElevatedApps.reg (provided by Logic Unknown ApS).

Example file ElevatedApps.reg (provided by Logic Unknown ApS)
Windows Registry Editor Version 5.00

; ============================================================================
; ElevatedApps.reg
; Publisher: Logic Unknown ApS - https://logic-unknown.com
; Documentation: https://docs.logic-unknown.com/aems/
;
; Template: how to add applications to the AEMS allow-list so a standard
; (non-admin) user gets them elevated silently, with no UAC prompt and no UI.
;
; Allow-list hive (base):    HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\<Name>
; Policy override hive:      HKLM\SOFTWARE\Policies\Logic Unknown\AEMS\Applications\<Name>
;   (a COMPLETE Applications subtree under the Policies hive wins over the base)
; Since AEMS 1.0.6.0 the key is SOFTWARE\Logic Unknown\AEMS. For devices still on 1.0.5.0
; or earlier see "Upgrading from 1.0.5.0 or earlier" in the documentation (the upgrade
; migrates the legacy key).
;
; Per-app values:
;   DataPath                         REG_SZ     - full path to a PE .exe (never empty:
;                                                 an empty path prefix-matches everything)
;   FriendlyName                     REG_SZ     - label used in the event log
;   Arguments                        REG_SZ     - command line (optional)
;   HashSHA                          REG_SZ     - exactly 64 hex chars, SHA-256 of the .exe.
;                                                 Enforced for standard users; for admins it
;                                                 is informational only (event 2003 + relaunch)
;   GlobalApplication                REG_DWORD  - 1 = applies to all users/sessions
;   AllowChildElevation              REG_DWORD  - 1 = this app's DIRECT children are relaunched
;                                                 elevated; absent/0 = deny (default)
;   AllowUserArguments               REG_DWORD  - 1 = forward the standard user's own command
;                                                 line on a top-level relaunch;
;                                                 absent/0 = configured Arguments only (default)
;   DoNotAllowChildElevateProccesses REG_DWORD  - deprecated (spelling is part of the wire
;                                                 contract); AllowChildElevation now decides
;
; Launch form when Arguments is non-empty:   "<DataPath>" <Arguments>
;
; THREE THINGS THAT COST TIME:
;   1. AEMSvc reads the configuration ONLY at service start.
;      After reg import, run:  Restart-Service AEMSvc
;   2. Allow-list the REAL installed executable, never a copy. A copied Windows
;      exe without its <lang>\*.mui satellite fails resource loading.
;   3. mmc.exe or control.exe on the list WITHOUT Arguments always opens empty,
;      because an entry is locked by default: the user's own arguments are
;      discarded and only the configured Arguments are used.
;
; Get a hash:   (Get-FileHash "<path>" -Algorithm SHA256).Hash
; Apply (elevated):   reg import ElevatedApps.reg  ->  Restart-Service AEMSvc
; At scale: push via Intune/SCCM/RMM, or bake into a customer MSI with
; Build-MsiWithSettings.cmd (provided by Logic Unknown ApS).
; ============================================================================


; --- 1) Plain GUI admin tool - the common case -----------------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Example GUI Tool]
"FriendlyName"="Example GUI Tool (elevated)"
"DataPath"="C:\\Program Files\\Vendor\\Tool\\tool.exe"
"GlobalApplication"=dword:00000001


; --- 2) MMC snap-in - Arguments is REQUIRED --------------------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Disk Management]
"FriendlyName"="Disk Management (elevated)"
"DataPath"="C:\\Windows\\System32\\mmc.exe"
"Arguments"="diskmgmt.msc"
"GlobalApplication"=dword:00000001


; --- 3) Control Panel applet via control.exe -------------------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Network Connections]
"FriendlyName"="Network Connections (elevated)"
"DataPath"="C:\\Windows\\System32\\control.exe"
"Arguments"="ncpa.cpl"
"GlobalApplication"=dword:00000001


; --- 4) App that spawns helper processes + hash-pinned ---------------------
; AllowChildElevation=1 makes the app a deliberate elevation springboard for
; its direct children, so pin the binary with HashSHA when you enable it.
; Replace the placeholder hash with the real one before importing. A malformed
; hash (not 64 hex digits) keeps the entry as a refusing entry: warning 2012 at
; service start and every launch it matches is refused. A well-formed hash that
; does not match the file refuses a standard user's launch (error 3009).
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Example Launcher]
"FriendlyName"="Example Launcher (elevated)"
"DataPath"="C:\\Program Files\\Vendor\\Launcher\\launcher.exe"
"HashSHA"="0000000000000000000000000000000000000000000000000000000000000000"
"AllowChildElevation"=dword:00000001
"GlobalApplication"=dword:00000001


; --- 5) App launched with the user's own command line ----------------------
[HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS\Applications\Example Arg Tool]
"FriendlyName"="Example Arg Tool (elevated)"
"DataPath"="C:\\Program Files\\Vendor\\Calib\\calib.exe"
"AllowUserArguments"=dword:00000001
"GlobalApplication"=dword:00000001


; ----------------------------------------------------------------------------
; Service-wide values live on the parent key, not per app:
;   [HKEY_LOCAL_MACHINE\SOFTWARE\Logic Unknown\AEMS]
;   "AdminPassthrough"=dword:00000001   ; default 1; 0 = administrators are
;                                       ; elevated the same way as standard
;                                       ; users and their child processes are
;                                       ; governed (default-deny)
;   "LogLevel"=dword:00000000
;
; To remove an entry:
;   reg delete "HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\Example GUI Tool" /f
;   Restart-Service AEMSvc
; ----------------------------------------------------------------------------

Use the tool

  1. Browse... to the exe. Name and Friendly name are filled in from the file unless you already typed them; the line below the path shows the file's company and product version so you can confirm it is the right binary. The path stays editable, so you can author entries for another machine (you get a warning, not a block, when the file does not exist here).
  2. Set Arguments if needed. They are required for mmc.exe (.msc) and control.exe (.cpl): an entry is locked by default, so the user's own arguments are discarded and the elevated program gets only the configured Arguments.
  3. Choose options, then Add to list. Repeat for more applications.
  4. Choose the target hive.
  5. Save .reg file... writes the file, or Add to registry... imports it now.

Add to registry writes the same .reg content to %TEMP%\AEMSAllowlist-<guid>.reg and imports it with System32\reg.exe import. As a standard user the tool relaunches itself elevated (one UAC prompt) with --apply "<file>" [--restart-service] --delete-after; that instance has no window, only a result message box. The elevated instance reads the file once, checks it, writes the checked content to a new file in its own temp folder and imports that copy, so the launching user cannot swap the file between the check and the import. After a successful import the list is cleared. When "Restart AEMSvc after import" is checked (and AEMSvc is installed), the service is stopped and started again with a 30 second timeout each. AEMSvc reads its configuration only at service start, so without the restart run Restart-Service AEMSvc yourself.

--apply is an internal switch for that relaunch, not a general import command:

  • It accepts only a file named AEMSAllowlist-<guid>.reg; any other file is refused (exit 2) and left untouched. To import a .reg file you saved, run reg import "<file>" elevated.
  • The content must look exactly like this tool's output: only the AEMS base or policy root (HKLM\SOFTWARE\Logic Unknown\AEMS or HKLM\SOFTWARE\Policies\Logic Unknown\AEMS, nothing else under the Logic Unknown vendor key, so the keys of other Logic Unknown products are never touched), its Applications key and Applications\<Name> keys, values only on the <Name> keys, only the ten value names above, strings or dword:00000000/dword:00000001 (ChildInPlace also dword:00000002, and not 1 or 2 without AllowChildElevation=1), HashSHA exactly 64 hex, PublisherThumbprint exactly 40 hex, Publisher and DataPath non-empty, no deletions. Keys under the legacy pre-1.0.6.0 vendor key are refused.
  • The incoming file is deleted only when --delete-after is given (the GUI relaunch passes it).

--apply exit codes: 0 imported (and restarted, if asked), 1 import failed, 2 bad arguments, wrong file name or refused content, 3 imported but the restart failed, 4 not 64-bit.

Wildcard path rules in the tool

Type a pattern in the Executable box, for example C:\Program Files\Contoso\Tools\setup_*.exe or C:\Program Files\Contoso\App ?.?\app.exe. Browse... picks a sample file; then edit its name into a pattern. A path that contains * or ? is a wildcard rule. The tool applies the same validity rules as AEMSvc at configuration load (see settings reference):

  • local path with a literal drive letter (X:\...); no UNC, \\?\ or device paths;
  • the drive and the first folder are literal; a file directly in the drive root is refused;
  • the file name ends with the literal .exe;
  • no /, ", <, >, |, control characters or a second :; no empty, . or .. folder component;
  • at most 251 characters (refused, never truncated);
  • Publisher or a SHA-256 hash is set, and "Applies to all users" is checked;
  • the hash, when set, is 64 hex digits; the thumbprint, when set, 40 hex digits.

The tool applies the same rules as the service, in the same order (it additionally treats U+007F to U+009F as control characters, and asks for Publisher whenever a thumbprint is set). * and ? never match a \, and the pattern must match the whole path. A folder created directly in the drive root (for example C:\Contoso) normally lets users write and fails the service's trusted-location check; use a folder under C:\Program Files.

Every string value has a maximum length, which the --apply guard enforces as well: path 251 characters for an exact path and a wildcard pattern alike (the driver's allow-list record holds 255 characters including the 4-character \??\ prefix, so a longer path could never match), friendly name 512, arguments 2047, publisher 256, key name 200. Line breaks, control characters and the Unicode line and paragraph separators are refused in every value.

What the service does with the rules (events 2012, 2013, 2016), where wildcard rules work (fixed drives on an accepted storage bus; the check is by bus, so point rules at the system drive) and why the folder of every elevated program must not be writable by standard users: Wildcard path rules and Folders of elevated programs.

  • Test against a file... picks a file and shows MATCH or NO MATCH for the typed pattern (and, when Publisher is set, whether the file's publisher matches). The preview is advisory; AEMSvc decides on the launched file.
  • Read from file... fills Publisher (subject CN of the leaf signing certificate) and Thumbprint (its SHA-1 thumbprint) from a file's embedded Authenticode signature. A file that is only catalog-signed (many Windows binaries) has no embedded signature and cannot be pinned by Publisher; pin its hash instead. A signature that is present but not valid on this machine is reported.
  • Pin SHA-256 hash on a wildcard rule asks for the file whose hash the rule must require.
  • Thumbprint is an extra pin and needs Publisher. Spaces and the invisible mark that the Windows certificate dialog adds when you copy a thumbprint are removed.

The tool does not check whether the folders are writable by standard users; AEMSvc does that at launch time and refuses the elevation when they are (see Wildcard path rules).

64-bit note for the tool

AEMSvc reads the 64-bit registry view. A 32-bit process that starts System32\reg.exe gets the WOW64 reg.exe and writes SOFTWARE\WOW6432Node\..., which AEMS never reads. The tool is therefore built x64 only and refuses to run as a 32-bit process.

Settings reference

Every AEMS setting lives under the base hive

HKLM\SOFTWARE\Logic Unknown\AEMS

or, to override it, under the policy hive

HKLM\SOFTWARE\Policies\Logic Unknown\AEMS

These are the paths from AEMS 1.0.6.0. AEMS 1.0.5.0 and earlier used a legacy vendor key; see Upgrading from 1.0.5.0 or earlier. Value names and meanings did not change.

AEMS (AEMSvc) runs as a native x64 service and reads the 64-bit registry view throughout. Author values in the 64-bit view (plain reg import from a 64-bit process, or an elevated regedit, does this).

The service reads configuration once, when it starts (install, boot, or Restart-Service AEMSvc) - a change takes effect after a service restart. Values documented here are exactly the ones AEMS reads; AEMS ignores anything else under the key.


Policy override (precedence)

When the policy hive is present, it wins over the base hive:

  • Scalar values (below) are read from the policy hive first, then the base hive.
  • The allow-list is all-or-nothing: if the policy hive has an Applications subkey, AEMS uses the policy allow-list in full and ignores the base allow-list. If it does not, AEMS uses the base allow-list.

Use the policy hive to push a locked-down allow-list from Intune/SCCM/RMM that a local edit of the base hive cannot weaken.


Top-level values

Key: HKLM\SOFTWARE\Logic Unknown\AEMS (or the policy hive)

Value Type Default Meaning
LogLevel REG_DWORD 0 Verbosity of the service's Windows Event Log output (source AEMS). 0 = normal; higher = more detail.
AdminPassthrough REG_DWORD 1 Administrator passthrough. When the console user is a local administrator (directly or through nested groups), an allow-listed app is relaunched with the user's real full token and is not registered for child governance. 0 = off (administrators are treated like standard users); any non-zero value = on. Policy hive wins. Read at service start. See Administrator users.
InstallDir REG_SZ (set by MSI) Informational install path, written by the installer (C:\Program Files\AEMS). AEMS itself runs from the gate-required fixed path regardless.
License REG_SZ absent = unlicensed 1.0.6.0+: the signed license key (<payload>.<signature>). The policy value wins when it exists (of any type; only REG_SZ is valid). Without a valid license AEMS does not elevate. Set by LICENSEKEY (MSI), AEMSvc.exe --set-license or policy; re-read at start, every 10 minutes and after --set-license. Never logged. See Licensing.
EndOriginalDescendants REG_DWORD absent = on 1.0.6.0+. Absent or any non-zero value (default) = when AEMS ends the un-elevated original start of an allow-listed program, it also ends the un-elevated programs that original had already started, so they do not run twice (event 1224). 0 = never, as in 1.0.5.0: those programs keep running un-elevated next to the elevated start (event 1225 at service start). Policy hive wins. Read at service start. See Children in place.
DisableDriverBindOnUnvalidatedBuild REG_DWORD absent = 0 1.0.6.0+. 1 = on a Windows build newer than the builds this AEMS version was validated on, AEMSvc does not connect to its driver: error 3213, no elevation. Policy hive or base hive. See Supported Windows versions.
LicenseUpgradeGraceStartUtc REG_SZ (written once by AEMS) 1.0.6.0+: UTC start (YYYY-MM-DDTHH:MM:SSZ) of the one-time 30-day upgrade grace on a device that had AEMS 1.0.5.0 or earlier. Base key only (never read from the policy key). Written once, never renewed; do not create or edit it.

Driver-read value: TamperProtection

Key: HKLM\SOFTWARE\Logic Unknown\AEMS only (the base hive; the driver does not read the policy hive for this value, and AEMSvc does not read it at all).

Value Type Default Meaning
TamperProtection REG_DWORD absent = 0 (off) Read by the kernel driver on every registry change under the AEMS key (driver 1.0.3.0 and later check the path first, so other registry writes on the system never read it). Non-zero = the driver denies registry changes under HKLM\SOFTWARE\Logic Unknown\AEMS (the key itself and everything below it) for every process except the registered AEMSvc: set value, delete value, delete key, set key security, replace key and set key information. Reads are always allowed. 0 or absent = no protection.

Notes and caveats (read before setting it):

  • Not set by the MSI, by a bundled settings file or by any example. It is an opt-in hardening switch; leave it absent unless you need it.
  • Scope. Only the base key ...\Logic Unknown\AEMS is protected, with a key boundary: other products under the same vendor key (HKLM\SOFTWARE\Logic Unknown\<product>) are never affected. The policy hive HKLM\SOFTWARE\Policies\Logic Unknown\AEMS is not protected by this switch; protect it with your management tool (GPO/Intune own it).
  • It locks itself. The value lives under the protected key, so once it is non-zero no administrator tool (reg.exe, regedit, Intune, a .reg import, AEMSAllowlist.exe) can change the allow-list, LogLevel, AdminPassthrough or TamperProtection itself while the driver is loaded. To change settings, stop AEMSvc and the AEMSDriver service (or uninstall), edit, then start them again (or reboot).
  • Registry view flags. From the driver shipped with AEMS 1.0.6.0 the harmless KeySetHandleTagsInformation call (information class 5, a tag on the handle, not data) is let through, so 64-bit reads with an explicit registry view (reg.exe /reg:64, .NET RegistryView.Registry64, Intune detection rules, MSI RegistrySearch Win64) work under the flag. Every other set-information class stays denied. Drivers in AEMS 1.0.5.0 and earlier denied class 5 as well, which made such view-flag reads fail with access denied and, combined with AEMSvc 0.1.4.0 and earlier, could start the service with an empty allow-list.
  • Uninstall caveat. With the 1.0.5.0 and earlier MSI, the uninstall's RemoveConfigKey step runs under msiexec, not the registered service, and was denied under the flag, leaving the AEMS key behind. For the behaviour of the 1.0.6.0 uninstall and upgrade with TamperProtection set (including an upgrade while the old driver is still loaded), see Upgrading from 1.0.5.0 or earlier. If a key is left behind after an uninstall, reboot (the driver is then gone) and delete it.
  • Repair. A repair (msiexec /fa, ARP Repair, REINSTALL=ALL) would rewrite InstallDir under the protected key and fail with Error 1406. From 1.0.6.0 the MSI skips its registry write during a repair while TamperProtection is non-zero (files are still repaired). To restore a deleted InstallDir or Applications key by repair, set TamperProtection to 0 first (stop AEMSvc and AEMSDriver, edit, start them).
  • What it is and is not. TamperProtection is tamper evidence against casual edits (a script, regedit, a stray .reg import), not a barrier against a determined local administrator. Not covered by the driver, unchanged in 1.0.6.0: renaming the AEMS key (or the Logic Unknown vendor key) away and creating a fresh unflagged key, RegRestoreKey / RegLoadKey over the vendor key, the Policies hive (a policy Applications subtree replaces the base allow-list) and the WOW6432Node view. An administrator can also stop the driver service.
  • Requires driver 1.0.3.0 or later (AEMS 1.0.6.0 ships driver 1.0.6.0). An AEMS MSI that packages an older driver (protocol 0x00020000) leaves TamperProtection without effect on this key; AEMSvc 0.1.7.0 and later report that at every start (warning 2007).

Approved applications (the allow-list)

Key: HKLM\SOFTWARE\Logic Unknown\AEMS\Applications\<Name> (one subkey per approved app; <Name> is any label).

Value Type Meaning
FriendlyName REG_SZ Label used in audit/logging.
DataPath REG_SZ Full path to the .exe launched elevated. Without wildcards it is matched as a case-insensitive prefix of the launched path: always write the full path including the file name, because a folder path (for example C:\Apps\) approves every program below it. 1.0.6.0+: a value that contains * or ? is a wildcard path rule, see Wildcard path rules.
Publisher REG_SZ 1.0.6.0+. Optional; required for a wildcard rule unless HashSHA is set. Exact, case-insensitive (trimmed) match against the subject common name (CN) of the leaf signing certificate of the file's embedded Authenticode signature. Also enforced on an exact-path entry when set.
PublisherThumbprint REG_SZ 1.0.6.0+. Optional extra pin: SHA-1 thumbprint (40 hex) of that leaf certificate. When present it must match, in addition to Publisher when that is set. AEMSvc also enforces a thumbprint without Publisher (a thumbprint-only pin in a hand-written entry); AEMSAllowlist.exe always asks for Publisher too. A value that is not exactly 40 hex digits (on any entry) is not dropped: AEMSvc logs warning 2012 once at service start and keeps the entry in its place as a refusing entry, so every launch it matches is refused with 2013 [MalformedRule] (an administrator gets 2016 and the relaunch with the own token; a child is not started at all). It is kept so that a later, broader entry cannot elevate the same file without the pin. Correct the value and restart the AEMSvc service.
Arguments REG_SZ Optional. Launch line = "<DataPath>" <Arguments> for a standard user's elevated relaunch (the user's own arguments are discarded unless AllowUserArguments=1). Enables elevating .cpl via control.exe, .msc via mmc.exe.
AllowUserArguments REG_DWORD Absent/0 (default, locked) = a standard user's top-level elevated relaunch gets only Arguments, never the user's own command line. 1 = the user's command line is forwarded verbatim (and Arguments is used only when the launch has no arguments). Administrator passthrough always forwards the original command line; governed children always keep their own command line. Event 1009 ends with (arguments: configured) or (arguments: user). Needs driver protocol 2 (AEMS.msi 1.0.3.0).
HashSHA REG_SZ Optional 64-hex SHA-256 of the .exe. When present, the file is hash-verified before launch (tamper check). 1.0.6.0+: a value that is not exactly 64 hex digits (on any entry) is not dropped: AEMSvc logs warning 2012 once at service start and keeps the entry in its place as a refusing entry, so every launch it matches is refused with 2013 [MalformedRule] (an administrator gets 2016 and the relaunch with the own token; a child is not started at all). It is kept so that a later, broader entry cannot elevate the same file without the pin. Correct the value and restart the AEMSvc service.
AllowChildElevation REG_DWORD Child-elevation opt-in. Absent/0 (default) = this app's children are relaunched non-elevated (default-deny). 1 = direct children are relaunched elevated. A child is elevated only if it is itself a top-level allow-listed app or a direct child of a registered-ELEVATE parent; a non-opted-in app is never elevated and stops the chain. Opt in only specific trusted tools; opting in a general shell or interpreter makes the user an administrator while it runs (see the security warning under Approve applications).
ChildInPlace REG_DWORD 1.0.6.0+. Valid only with AllowChildElevation=1. Absent/0 (default) = children are blocked and relaunched as a copy, as in 1.0.5.0. 1 = direct children start elevated in place (as real children); what they start is refused unless it has its own opted-in entry. 2 = whole tree: every program below the app, up to 8 levels, starts in place without an entry of its own. Programs started in place must lie in a folder standard users cannot change; a child that fails a check is not started and no copy starts. Without AllowChildElevation=1, with another value or with another type the value counts as off and AEMSvc logs warning 2230 at service start that names the entry. Needs the 1.0.6.0 driver and a valid license or the upgrade grace; otherwise warning 2220. Read at service start. See Children in place.
DoNotAllowChildElevateProccesses REG_DWORD Deprecated for the decision (superseded by AllowChildElevation). Still read and sent on the wire for back-compat.
GlobalApplication REG_DWORD 1 = applies to all users on the machine.

The value name DoNotAllowChildElevateProccesses is spelled exactly as AEMS reads it (including the double-c Proccesses); it is part of the wire contract with the driver and must not be "corrected".

Worked example: the example file NetworkSettings.reg (elevated ncpa.cpl, Network and Sharing Center, Control Panel, with more launchers commented out).


Wildcard path rules

From AEMS 1.0.6.0 (AEMSvc 0.1.7.0 or later with driver 1.0.6.0; wildcard matching needs driver protocol 0x00020002 or later) an allow-list entry can name an executable by a path pattern instead of one exact path, for example C:\Program Files\Contoso\Tools\setup_*.exe or C:\Program Files\Contoso\App ?.?\app.exe. A launched file whose full path matches the pattern is elevated like any other entry, but only after two mandatory guards pass. Worked example: the example file WildcardRules.reg; how-to: Wildcard path rules.

An entry is a wildcard rule when its DataPath contains * or ? (neither is legal in a real path, so no extra mode value exists). Entries without those characters keep their behaviour unchanged (case-insensitive prefix match).

Pattern semantics (driver and service match identically)

  • The pattern must match the whole image path, not a prefix. Case-insensitive.
  • ? matches exactly one character that is not \.
  • * matches zero or more characters that are not \. Wildcards never cross a folder boundary: C:\Program Files\Contoso\*.exe does not match C:\Program Files\Contoso\sub\x.exe, and there is no recursive **.
  • Wildcards may appear in the file name and in folder components (C:\Program Files\Contoso\*\app.exe matches exactly one folder level).
  • When several entries match, the first one in registry order wins, as for exact entries.

Validity rules (checked by AEMSvc at service start)

An entry that breaks a rule is dropped (not sent to the driver, never matched) or, for a malformed HashSHA or PublisherThumbprint, kept as a refusing entry (see below). Either way AEMSvc logs warning 2012 with the entry name and the reason. The order of the checks: an empty DataPath drops any entry; a wildcard entry with an invalid pattern or GlobalApplication not 1 is dropped; a malformed pin on any remaining entry keeps it as a refusing entry; a wildcard entry without Publisher and HashSHA is dropped.

  • Absolute local path X:\... with a literal drive letter. No UNC (\\server\share), no \\?\, no device paths.
  • The drive and the first folder component are literal (no wildcard before the second \). A file directly in the drive root (C:\setup*.exe) is rejected.
  • No /, ", <, >, |, control characters or a second :; no empty, . or .. folder component.
  • The last component ends with the literal .exe (case-insensitive).
  • At most 251 characters (the driver's 256-character field minus \??\ and the terminator). A longer pattern is rejected, never truncated, because truncation would change what it matches.
  • Publisher or HashSHA is set.
  • GlobalApplication is 1. An entry of any kind whose DataPath is missing or empty is dropped as well (2012, code [path]).

A malformed HashSHA (not exactly 64 hex digits) or PublisherThumbprint (not exactly 40 hex digits), on any entry, exact or wildcard, is different: the entry is kept in its place as a refusing entry. AEMSvc logs 2012 once at start ([hash] or [thumbprint], "KEPT in its place as a REFUSING entry"), and every launch the entry matches is refused with 2013 [MalformedRule] (an administrator gets 2016 and the relaunch with the own token; a child is handled as not started at all). Keeping it in place means a later, broader entry cannot elevate the same file without the pin. Correct the value and restart the AEMSvc service.

The reason in warning 2012 is one of [length], [drive], [character], [component], [root], [first-folder-wildcard], [extension], [global], [signer], [path] (entry dropped), or [hash] / [thumbprint] (entry kept as a refusing entry). AEMSAllowlist.exe 1.3.0.0 applies the same rules before it writes a .reg file.

Guards, limitations and events

At launch AEMS checks two guards on the concrete file before a wildcard rule (or a Publisher / PublisherThumbprint pin) elevates anything. The guards, their outcomes and the limitations of wildcard rules are described on the security page: Wildcard rule guards and Wildcard rule limitations. The events are listed in Wildcard rule events.


Applying settings

  • Manually: edit one of the example files from the Configure page (or write your own), reg import <file> from an elevated prompt, then Restart-Service AEMSvc.
  • At scale: push the .reg via Intune/SCCM/RMM into the base or policy hive, or bake the allow-list into the MSI - see Bundle settings into the MSI.