Problem Summary
The Siemens Automation License Manager (ALM) raises the message "Cryptographic provider initialization failed (PlugIn SCP3 - 0x80090016)" during PCU boot on a SINUMERIK 840D sl system. The license service is unable to initialize its plug-in cryptographic layer, so license acquisition for SINUMERIK Operate, HMI-Pro, COM, and additional optional packages fails immediately after the operating system starts. End users see red status fields inside SINUMERIK Operate and the machine is unable to release option bits that depend on the local license stick or soft container.
This fault appears on the SINUMERIK PCU 50.x (Windows XP Embedded / Windows 7 Embedded Standard) and on PCU 50.5 with Windows 10 IoT LTSB. It is unrelated to license content, the CFast card, or the dongle hardware. The error is generated by the Microsoft CryptoAPI when the Microsoft Software Key Storage Provider (KSP) cannot enumerate the machine key set located under C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto (XP/embedded classic) or the corresponding %ProgramData%\Microsoft\Crypto location on newer PCU images. The ALM SCP3 plug-in uses this key set to sign and decrypt license containers, so any ACL damage, antivirus quarantine, or partial key-store corruption results in a startup-time CryptAcquireContext failure with HRESULT 0x80090016.
The error is logged in:
-
%ALM_LOG_DIR%\almservice.log(typicallyC:\Program Files\Siemens\Automation License Manager\Bin\almservice.log) - Windows Application Event Log: Source almservice, Event IDs 100, 200, 5000 with
0x80090016in the data field - SINUMERIK Operate diagnostics view: Diagnostics > Service Overview > Licenses shows the SCP3 plug-in as not loaded
Technical Background: ALM Plug-In SCP3 and Microsoft CryptoAPI
The SCP3 plug-in is the cryptographic service provider used by ALM to validate license keys signed with Microsoft's CryptoAPI. ALM versions 4.0 SP3 through 6.0 use SCP3 as the default provider for both signed soft containers (license files on disk) and CFast/USB license sticks. The plug-in is implemented in scp3.dll, registered as a Windows service dependency, and relies on a machine key set stored in the system-wide Crypto directory.
The Microsoft CryptoAPI key store layout is:
| Path (XP / Embedded) | Path (Win 7 / Win 10 IoT) | Contents |
|---|---|---|
%AllUsersProfile%\Application Data\Microsoft\Crypto\ |
%ProgramData%\Microsoft\Crypto\ |
Root container with per-user and per-machine subfolders |
...\Crypto\MachineKeys\ |
...\Crypto\MachineKeys\ |
System-level RSA/ECDSA key containers used by services |
...\Crypto\SystemCertificates\ |
...\Crypto\SystemCertificates\ |
Local enterprise trust store |
The MachineKeys directory contains files of the form {GUID} (e.g. d6b88a25-d3d3-4c2e-a4b3-1234567890ab) that represent individual key containers. Each container has a per-ACL that restricts Read, Write, and Delete to SYSTEM, Local Service, and the user account that originally created it. ALM runs under the almservice local account (or the configured service account) and must be able to enumerate and CryptAcquireContext against the machine-default provider for license validation.
Error code 0x80090016 is in the NTE-prefixed CryptoAPI HRESULT space (range 0x80090000 – 0x8009FFFF). The PlugIn SCP3 error path is generated when CryptAcquireContext returns a non-success NTSTATUS during the PlugInInitialize call. In the field, the most common triggering conditions are:
- ACL on
Crypto\MachineKeyshas been changed and no longer grants Everyone or SERVICE enumeration rights. - An antivirus product (notably Kaspersky Endpoint Security) has placed a key container file in quarantine or replaced it with a quarantined.dat stub.
- The folder has been re-created by a third-party cleanup tool without the original DACL.
- A Windows update or embedded image restore has re-stamped permissions to the default, which on embedded SKUs does not include the Local Service SID needed by ALM.
Root Cause
On a freshly imaged or maintained 840D sl PCU, the Crypto directory under All Users\Application Data holds the default DACL that grants Everyone:Read and SYSTEM:Full Control. ALM's almservice relies on the explicit ACE for Everyone (or, in hardened images, for the dedicated service SID) to enumerate the MachineKeys directory at startup. The moment the ACE is removed, the CryptAcquireContext call inside SCP3 fails with a CryptoAPI error, which is wrapped into 0x80090016 and surfaced as a plug-in initialization failure.
In the case that triggered this article, the issue was compounded by Kaspersky Endpoint Security, which had hooked the Crypt32 and SCP3 libraries at boot. The Kaspersky self-protection module quarantined one of the machine key containers because it matched a heuristic signature, which removed the file from MachineKeys and forced the ALM service into a fail-state at startup. Reinstalling ALM 4.0 SP5 did not fix the issue because the underlying Crypto directory was still in a corrupted or inaccessible state.
Diagnostic Workflow
Before applying the resolution, run the following checks to confirm that the issue is in the key store and not in the ALM installation, license stick, or SINUMERIK Operate package set.
- Capture the exact event log entry. Open Event Viewer on the PCU, navigate to Windows Logs > Application, and locate the almservice source entry containing the hex code. Note the Event ID and the user account referenced in the message.
-
Inspect the ALM service log. The file
almservice.login the ALM bin directory contains a line of the form:PlugInInitialize: SCP3 failed, hr=0x80090016, provType=1 -
Check the file system. Open an elevated command prompt and run
icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto"(XP/embedded) oricacls "%ProgramData%\Microsoft\Crypto"(Win 7/10). The output must include BUILTIN\Users with at least (R) or NT SERVICE\almservice:(R). -
Verify the MachineKeys contents. List the directory
MachineKeys. The presence of quarantined.dat, zero-byte files, or an empty folder indicates antivirus or backup-restore corruption. -
Confirm the plug-in is registered. Run
reg query "HKLM\SOFTWARE\Siemens\Automation License Manager\PlugIns" /sand verify thatSCP3is present and points to%ALM_BIN%\scp3.dll.
Step-by-Step Resolution
The remediation path is split into three phases: stop the ALM service, repair or rebuild the key-store permissions, then restart. Always perform the work from a SINUMERIK administrator account (member of the Siemens Administrators local group) and ensure the PCU is in a quiet, non-production state because the license manager is required to be stopped before touching the Crypto directory.
Phase 1 – Stop ALM and Capture State
- Open a command prompt as administrator.
- Stop the service:
net stop almservice - Stop any dependent processes that may still hold handles to the Crypto directory:
taskkill /F /IM almgui.exetaskkill /F /IM sinumerik_operate.exe - Make a safety copy of the entire Crypto directory before any modification:
xcopy /E /H /K "%AllUsersProfile%\Application Data\Microsoft\Crypto" "D:\Backup\Crypto_%date:~-4%%date:~3,2%%date:~0,2%\"
(On Win 7/10 PCU 50.5 use%ProgramData%\Microsoft\Crypto.)
Phase 2 – Repair the Crypto Directory ACL
If you want to keep the existing machine keys, fix the ACL on the directory and the MachineKeys subdirectory. Use the explicit form below for Windows XP Embedded / Windows 7 Embedded SKUs (the default OS on PCU 50.x).
- Reset the DACL on the parent Crypto directory and propagate the inheritance:
icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto" /reset /T - Add the Everyone principal with Read permission (the System account is already present after the reset):
icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto" /grant Everyone:(OI)(CI)RX - On the MachineKeys subdirectory grant Everyone the same rights and ensure SYSTEM retains Full Control:
icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto\MachineKeys" /grant Everyone:(R) /Ticacls "%AllUsersProfile%\Application Data\Microsoft\Crypto\MachineKeys" /grant System:(F) /T - Verify:
icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto\MachineKeys\*
Each container file should list at least SYSTEM:(F) and BUILTIN\Users:(R).
Phase 2B – Rebuild the Machine Key Set (When ACL Repair Fails)
If the ALM log keeps reporting 0x80090016 after the ACL reset, the key containers themselves are damaged. The supported procedure on SINUMERIK PCU 50.x is to delete the entire Crypto directory tree and let Windows and ALM regenerate it on the next boot. License sticks are not affected by this action because their keys live in the dongle hardware, not in MachineKeys. Soft containers in the ALM licenses directory are also untouched.
- Confirm the ALM service is stopped (Phase 1).
- Delete the directory:
rmdir /S /Q "%AllUsersProfile%\Application Data\Microsoft\Crypto" - Reboot the PCU. Windows recreates Crypto and MachineKeys with the default DACL, and ALM regenerates its plug-in key set on first start.
- Open ALM View (Start > Siemens Automation > License Manager) and confirm the SCP3 plug-in shows OK in the status column.
Phase 3 – Restart ALM and Verify
- Start the service:
net start almservice - Confirm the service is running:
sc query almservice→ state must be RUNNING, exit code 0. - Open Event Viewer > Application. The almservice source must report PlugIn SCP3 loaded with no
0x80090016entries. - In SINUMERIK Operate, navigate to Diagnostics > Service Overview > Licenses. All licensed axes and options must be marked active with green status indicators.
Verification Checklist
| Check | Command / Location | Expected Result |
|---|---|---|
| ALM service state | sc query almservice |
STATE: 4 RUNNING, EXIT_CODE: 0 |
| PlugIn SCP3 status | ALM View > Plug-Ins | SCP3 row, Status: OK, Version: matches ALM build |
| Cryptographic provider log | almservice.log | Latest line: PlugInInitialize: SCP3 OK |
| Event log | Application log, source almservice | No new 0x80090016 entries |
| SINUMERIK Operate | Diagnostics > Service Overview > Licenses | All enabled options show green |
| MachineKeys DACL | icacls ...\Crypto\MachineKeys\* |
SYSTEM:(F) and BUILTIN\Users:(R) present |
| Reboot test | shutdown /r /t 0 |
ALM starts cleanly with no plug-in fault |
Antivirus Interference: The Kaspersky-Specific Caveat
Kaspersky Endpoint Security 10 SP2 MR3 and later, as well as Kaspersky Security 11, hooks the Crypt32 DLL and a number of CryptoAPI entry points as part of its self-protection subsystem. On an 840D sl PCU that is shut down hard or that runs an aggressive scan during boot, the Kaspersky self-protection driver can:
- Quarantine a key container file in MachineKeys because of a heuristic signature that triggers on RSA key blobs.
- Replace the original
scp3.dllwith a shadow copy during the pre-boot phase, breaking the integrity signature that ALM performs on load. - Lock the Crypto directory against enumeration from local service accounts, which leads to the same
0x80090016error.
Recommended actions for installations where Kaspersky is mandatory:
- Add the entire ALM installation path (default
C:\Program Files\Siemens\Automation License Manager) to the Kaspersky trusted applications list with the Do not scan opened files and Do not monitor application activity options enabled. - Add the Crypto directory and all its subdirectories to the exclusions list of both the File Anti-Virus module and the Behavior Detection module.
- Disable the System Watcher component on the PCU if it is not required by corporate policy; it is the component that performs the heuristic checks on key containers.
- After applying the exclusions, run the Phase 2B rebuild so that all quarantined or shadowed files are replaced with clean copies.
The original problem report on the field was resolved simply by closing Kaspersky, repairing the Crypto DACL, and rebooting. The user explicitly reported that reinstalling ALM was not necessary and that a clean reboot of the PCU (not just the ALM service) was sufficient to clear the fault.
Firmware and Software Version Notes
| ALM Version | SCP3 Plug-In | Known Behavior |
|---|---|---|
| 4.0 SP3 | SCP3 1.0.0 | First release to use CryptoAPI key set under MachineKeys; sensitive to DACL changes |
| 4.0 SP5 | SCP3 1.0.1 | Adds retry on transient CryptAcquireContext failures; subject of the original fault |
| 5.0 | SCP3 2.0.0 | Switches to Microsoft KSP; same directory but uses CNG containers |
| 5.3 / 5.4 | SCP3 2.0.1 | Adds integrity check; first version that logs 0x80090016 with the human-readable text PlugIn SCP3 - 0x80090016
|
| 6.0 / 6.0 SP1 | SCP3 2.1.0 | Default on SINUMERIK Operate V4.95 SP5 / V5.x; introduces SCP4 plug-in alongside SCP3 |
ALM 4.0 SP5 is the version explicitly named in the source fault report. Later versions of ALM (5.x, 6.x) replace SCP3 with the SCP4 plug-in, which uses the Microsoft Key Storage Provider (CNG) instead of the legacy CryptoAPI. The directory layout and the underlying DACL requirements are essentially the same, and the same Phase 2 procedure resolves the equivalent 0x80090016 error from SCP4 as well. Always confirm the running ALM build by reading the About dialog in ALM View before applying the fix, because some SINUMERIK images (notably the HMI-Pro sl variants) ship a customized 4.0 SP5 with an OEM signature check that requires the original installation media for a clean reinstall.
When to Reinstall ALM (and When Not To)
The field report confirms that reinstalling ALM 4.0 SP5 is not necessary when the underlying problem is a corrupted or inaccessible Crypto directory. The ALM installation itself is intact; the SCP3 plug-in fails because it cannot read a system-level key set. Reinstalling the same ALM build on top of the same corrupt key set simply re-runs the same failing CryptAcquireContext call and produces the same error.
Reinstall is justified only when:
- The
scp3.dllfile is missing or has a binary mismatch (compare the SHA-256 hash with the original installation media). - The ALM service fails to start with error 1053 (service did not respond) which indicates a missing dependency rather than a key-store issue.
- The license container file in
C:\Program Files\Siemens\Automation License Manager\Licensesis corrupted. In that case thePlugInInitializecall succeeds but a subsequentCryptDecryptcall returns the same0x80090016HRESULT. - A SINUMERIK software update explicitly requires a new ALM build (consult the Siemens Industry Online Support release notes).
When reinstalling, use the Siemens Automation License Manager Setup from the matching SINUMERIK service pack, not the generic Siemens Automation Tools installer. The SINUMERIK installer registers the service under the correct local account (LocalSystem on 4.0 SP5, NT SERVICE\almservice on 5.x and later) and writes the correct plug-in registry entries.
Preventive Measures
-
Image the Crypto directory with the rest of the PCU image. When you build a golden PCU 50.x image, capture the Crypto directory with all DACLs. Use
robocopy /MIR /SEC /SECFIXrather thanxcopyto preserve the security descriptors when restoring to other PCUs. -
Lock the directory against user modification. Apply a Group Policy preference that prevents Users from writing to
%AllUsersProfile%\Application Data\Microsoft\Cryptoon the PCU. Embedded GPOs are supported on Windows XP Embedded with the Secure Boot feature enabled. - Configure the antivirus exclusions described above before the first commissioning of the machine, not after the first fault. Most installations discover the issue only after a hard shutdown of the PCU that triggers a full Kaspersky scan.
-
Schedule a monthly health check that runs the following script and emails the result to maintenance:
sc query almservice | findstr STATEfindstr /C:"0x80090016" "%ALM_BIN%\almservice.log"icacls "%AllUsersProfile%\Application Data\Microsoft\Crypto" | findstr Everyone
If any of the three checks fail, raise a maintenance ticket before the next production shift. - Document the OEM customizations. If the SINUMERIK image includes OEM-signed license containers (e.g. for a machine builder's option bits), back up the Licenses directory as well, and store it together with the Crypto backup on the same media.
Related Errors and How They Differ
| Error | Source | Likely Cause | Distinguishing Detail |
|---|---|---|---|
0x80090016 |
ALM PlugIn SCP3 / SCP4 | Key set not accessible or corrupted | Message: Cryptographic provider initialization failed |
0x80090006 (NTE_BAD_KEYSET) |
ALM PlugIn SCP3 | Key set not found | Message: Key set does not exist – rebuild from scratch |
0x8009000D (NTE_NO_KEY) |
ALM PlugIn SCP3 | Container is empty | Visible after a license stick hot-swap |
0x80070005 (E_ACCESSDENIED) |
ALM PlugIn SCP3 | Service account lacks rights | Fix by running almservice as LocalSystem |
0x80004005 (E_FAIL) |
ALM PlugIn SCP3 | Generic plug-in load failure | Often a missing dependency DLL |
0x8007007E (ERROR_MOD_NOT_FOUND) |
almservice |
scp3.dll missing or wrong architecture |
Visible when mixing 32-bit / 64-bit ALM |
When the ALM log shows any of the other hex codes in this table, apply the same Phase 2 DACL repair as a first step. If the error persists, escalate to a license-container rebuild or ALM reinstall as described in the previous section.
Files and Registry Touched by the Resolution
| Path | Action | Reversibility |
|---|---|---|
%AllUsersProfile%\Application Data\Microsoft\Crypto\ |
ACL reset / optional delete | Rebuilt by Windows on next boot |
%AllUsersProfile%\Application Data\Microsoft\Crypto\MachineKeys\* |
Container files preserved (Phase 2) or removed (Phase 2B) | Phase 2B rebuilds them automatically |
HKLM\SOFTWARE\Siemens\Automation License Manager\PlugIns\SCP3 |
Untouched by the resolution; verify it exists | Created by ALM installer |
HKLM\SYSTEM\CurrentControlSet\Services\almservice |
Untouched; verify the ImagePath points to almservice.exe
|
Created by ALM installer |
| Append-only log; truncate or archive as needed | Safe to delete at any time |
Safety and Production Considerations
Related Siemens Documentation and Knowledge Base
- SINUMERIK 840D sl Operator Components Manual (PCU 50.x) – License Manager section
- Automation License Manager V4.0 SP5 Release Notes and Installation Guide
- SINUMERIK 840D sl Commissioning Manual – Software Update and Image Restore
- SINUMERIK Operate V5.x Service Manual – License Diagnostics
- Microsoft CryptoAPI: CryptAcquireContext and Key Storage Providers
- Microsoft Key Storage Provider (KSP) reference
FAQ
What does Siemens ALM error 0x80090016 mean on a SINUMERIK 840D sl PCU?
The error is a Microsoft CryptoAPI failure raised by the ALM SCP3 plug-in. It indicates that the service cannot acquire a cryptographic context because the machine key set under %AllUsersProfile%\Application Data\Microsoft\Crypto\MachineKeys is either missing, quarantined, or protected by an ACL that no longer grants the ALM service read access. The fix is to reset the directory DACL or delete the directory and let Windows rebuild it on reboot.
Do I have to reinstall ALM 4.0 SP5 to clear PlugIn SCP3 fault 0x80090016?
No. Reinstalling ALM does not address the underlying Crypto directory corruption. In the field, simply repairing the ACL on the Crypto folder and rebooting the PCU (not just the ALM service) was sufficient to clear the fault. Reinstall only when scp3.dll is missing or has a binary mismatch with the ALM installation media.
Why does Kaspersky trigger the same 0x80090016 error on the PCU?
Kaspersky Endpoint Security hooks the CryptoAPI and may quarantine individual MachineKeys container files when a heuristic signature matches. It can also lock the Crypto directory against local service enumeration. The fix is to add the entire ALM installation path and the Crypto directory tree to the Kaspersky trusted applications and exclusions list, then rebuild the key set by deleting Crypto and rebooting.
Is a service restart enough, or must I reboot the PCU?
Reboot the PCU. The MachineKeys handles are cached in the LSASS process. Stopping and restarting the ALM service does not release the cache, so a stale handle set persists. A full OS reboot clears the cache, lets Windows rebuild the default Crypto DACL, and lets ALM regenerate its plug-in key set on first start.
Will deleting the Crypto directory erase my license stick contents?
No. License sticks (CFast cards or USB dongles) store their cryptographic material in hardware, not in MachineKeys. Deleting the Crypto directory on the PCU affects only the Windows machine key set, which is automatically regenerated on boot. Soft license containers under %ALM_BIN%\Licenses are also untouched.
Does the same fix apply to ALM 5.x and 6.x with the SCP4 plug-in?
Yes. The SCP4 plug-in uses the Microsoft KSP (CNG) instead of the legacy CryptoAPI, but the underlying machine key set still lives in the same Crypto directory and is subject to the same DACL requirements. The same Phase 2 ACL repair and the same Phase 2B rebuild resolve the equivalent 0x80090016 error from SCP4 as well.