Fix Siemens ALM Cannot Write Data Medium in Drive E Error

David Krause18 min read
SiemensTIA PortalTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Definition

Automation License Manager (ALM) V6.2+SP4 raises the dialog "Cannot write to the data medium in drive E:" when a license write is attempted on a programming device (PG) that runs TIA Portal V18. The error is raised inside the ALM service process, not by the operating system or by TIA Portal. The license file being transferred is provably valid: the same license transfers cleanly from a peer PG/PC using the same ALM build. The fault is therefore environmental and local to the affected programming device.

The error blocks the following transfer scenarios:

  • Local license move from C:\ (vault) to USB stick reported as drive E:
  • Local license move from USB stick E: to C:\ (vault)
  • Peer-to-peer drag-and-drop where the destination is the local PG's USB dongle
  • Offline license bundle import when the import is staged through drive E: instead of through the ALM direct import path
Drive E: is almost always a removable USB device. Do not assume E: is a network share without verifying with diskmgmt.msc or subst. A real network share mapped to E: will silently fail ALM license writes because CIFS does not honor the journaled write semantics ALM requires.

Environment Snapshot

The reported failing configuration is reproduced in the matrix below.

Component Reported Version Notes
TIA Portal V18 Released 2023; ALM V6.2 is bundled by default
Automation License Manager V6.2 SP4 Standalone installer; matches TIA Portal V18 family
Source PG OS Windows 10 22H2 Offline transfer works from this side
Target PG OS Windows 11 22H2 Dialog raises on this side; offline target works
License target USB dongle (SITOP-style) on letter E: Confirmed by peer that the USB stick is read/write
PEER PG (working) Same TIA V18 + ALM V6.2 SP4 Success indicates valid license container
Reinstall attempted ALM V6.2 SP4 fresh install No change in symptom
IT group policy audit User has USB write on personal USB Personal write works, but drivers do not match Siemens key type
Resolution path used Offline transfer source → USB → target ALM import Succeeded end-to-end

Cross-referenced against documented compatibility: Siemens Industry Online Support confirms ALM V6.2 SP4 is the recommended pairing for TIA Portal V18.

ALM Architecture and Service Path

ALM is implemented as a Windows service that hosts a license vault and a transfer agent. The transfer agent performs three independent operations: read source, stage transfer, write destination. The dialog text exposes only the failing step: write to destination. To resolve the fault the engineer must determine which layer of the chain denies the write.

Layer Component Default Permissions
1 ALM service: ALMService.exe LocalSystem
2 ALM vault: C:\ProgramData\Siemens\AutomationLicenseManager RW for LocalSystem, RO for Users
3 USB controller stack: usbstor.sys Mediated by policy
4 USB file system: NTFS / FAT32 on stick Subject to write-protect registry and BitLocker
5 Anti-virus / EDR on-access scan Gatekeeper for .lic extension on some stacks
6 Network share policy (if drive letter is mapped) RO-by-default for users

Failure at any layer produces the same dialog. The fault is not in the license container. Read the dialog as "write access to drive E: was denied at one of the layers above."

Root Cause Analysis

The dialog does not encode a Siemens internal error code in this revision. To triage, the engineer must reproduce the failure at the OS layer first, then work backwards to the ALM layer.

Cause 1: USB Write Block by Group Policy

Windows GPO under Administrative Templates → System → Removable Storage Access can deny write to removable disks. If the policy is enabled, ALM appears to copy the license and then immediately removes it (the copy operation succeeds in memory but the final commit fails). On Windows 11 22H2 / 23H2 the policy is enforced by default in some MDM templates.

Detection: try creating a 1 KB file on E: from File Explorer. If it fails, GPO is the cause.

Cause 2: USB Driver Read-Only Mode

Some USB license dongles report a write-protect bit through the SCSI / USB Mass Storage mode sense page. ALM is unable to override this; it is a hardware-enforced state. The driver's mode page may be locked even if a regular FAT32 USB stick writes successfully on the same controller.

Detection: insert a different USB stick with a regular FAT32 volume. If a regular write fails, GPO (Cause 1) is the cause. If a regular write succeeds and the Siemens dongle fails, driver-level write-protect is in effect.

Cause 3: ALM Service Token Stale

After a TIA Portal upgrade or after a Windows feature update, the ALM service token (SID + impersonation chain) can become inconsistent with the local user profile. The service continues to run with LocalSystem but cannot establish write context to the USB. ALM reinstall does not refresh the token.

Detection: sc query "ALMService" shows START_PENDING or STOP_PENDING. Even when service STATE is RUNNING, recovery token inconsistency can produce the dialog.

Cause 4: Drive Letter Collision

If a network share is mapped to drive E: persistently via net use, logon script, or VPN auto-mount, ALM's call to WriteFile returns success on the share's offline cache but the file is never committed to removable media. On the next remount the license has "disappeared."

Detection: net use lists E: mapping. subst lists E: as a substitution target.

Cause 5: ALM V6.2+SP4 / Windows 11 BitLocker Drive Encryption Conflict

USB BitLocker To Go volumes report protected write paths. ALM does not auto-unlock, and the write returns ERROR_ACCESS_DENIED at the controller. This is OS-version specific and emerged in Windows 10 20H2 / 11 21H2.

Detection: manage-bde -status E: returns Conversion Status: Fully Encrypted.

Cause 6: Anti-Virus / EDR .lic Extension Gatekeeping

Sophos, CrowdStrike, Defender for Endpoint, and Trend Micro can flag .lic as a license-vault extension and either quarantine or deny-write. The dialog looks identical to a USB issue but the fault is the EDR policy.

Detection: EDR quarantine log shows *.lic on E: dropped.

Pre-Diagnosis Checklist

  1. Confirm the Windows build of the failing PG: Win+R → winver. Windows 11 22H2 / 23H2 has the default USB policy tightened.
  2. Open diskmgmt.msc and verify drive E: maps to a USB removable device with a valid volume label, not a network share.
  3. From cmd.exe as Administrator, run manage-bde -status E: to confirm BitLocker is not mounted.
  4. Try writing a 1 KB test file (test.lic) to E: from File Explorer. If this fails, the issue is OS-level, not ALM.
  5. Confirm Windows Defender is not configured to block .lic executable files. Open Windows Security → Virus & threat protection → Exclusions and add the USB drive root.
  6. Verify the TIA Portal service pack matches the ALM service pack. ALM V6.2 SP4 is the recommended pairing for TIA Portal V18.
  7. Confirm peer PG/PC is reachable on TCP 4410 if attempting online transfer: Test-NetConnection -Port 4410 in PowerShell.
  8. Capture ALM log location: %LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ALMService.log.

Diagnostic Procedure

Follow the procedure below to isolate the failure layer.

Step 1: Validate the License Container

In ALM, select Help → Support Information → Read License Database. A database export that opens without error confirms the local ALM cache is read-only-blocked rather than corrupted. Compare the MD5 hashes against the peer PG export to validate license integrity.

Step 2: Validate Write Access at OS Level

Issue the following commands from an elevated cmd.exe:

echo ALM_TEST > E:\write_test.lic del E:\write_test.lic

If the echo returns "Access is denied" the USB controller or GPO is denying the write. Proceed to the GPO and registry diagnostic in Resolution 3.

Step 3: Validate ALM Service State

Issue from elevated cmd.exe:

sc query "ALMService"

Expected output: STATE: 4 RUNNING. If state is 1 STOPPED, 2 START_PENDING, 3 STOP_PENDING, or 5 PAUSED, restart the service:

net stop "ALMService" net start "ALMService"

If the service fails to start, check the application event log for ALMService errors under Applications and Services Logs → Siemens Automation License Manager.

Step 4: Validate Network Path for Online Transfer

If the transfer is online between two PGs, confirm:

Test-NetConnection -ComputerName <peer_pg> -Port 4410

Default ALM listening port is 4410/TCP. Firewalls with intrusion prevention may block the packets silently.

Step 5: Capture ALM Log at Failure Time

Reproduce the dialog while tailing the log:

Get-Content "%LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ALMService.log" -Wait

The log will record the deny path (USB driver, volume manager, or backing service). Capture the last 200 lines at failure time for support escalation.

ALM Log Location and Interpretation

Log File Location Use
ALMService.log %LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ Service-side transfer events; primary diagnostic
ALMUI.log %LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ UI events on operator side; secondary
ALMCore.trace %LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ License token & decryption events
Event Log Application eventvwr.msc → Windows Logs → Application Service start/stop, recoverable errors

Search for the keyword "WriteFile" or "ERROR_ACCESS_DENIED" in the log. The next non-zero NTSTATUS code in the trace corresponds to the failing layer.

Resolution 1: ALM Online Server Workaround

If a peer PG on the same network has a working ALM instance, license transfers between two ALM services do not touch the failing USB controller. They use TCP 4410 and the ALM license protocol. This is the cleanest workaround when the destination USB is locked at the GPO level but the network path is permitted.

Procedure

  1. On the peer PG (working ALM), open ALM → Edit → Connect Target Computer. Enter the failing PG hostname or IP and click Connect.
  2. On the failing PG, open ALM → Edit → Connect Target Computer. Enter the peer PG IP. Confirm the connection state is "Connected".
  3. Drag the license from the peer ALM license list to the local ALM target. The transfer occurs ALM-service to ALM-service and does not require local USB write access.
  4. Verify the local vault contains the license. Restart the failing PG; license persists if the local vault was written correctly.
Online transfer uses one direction at a time. Most ALM versions refuse bi-directional transfer between two PGs to prevent license cloning. If the peer PG already contains a license of the same type, transfer direction matters; ALM tracks the original master seat on a per-license basis.

For full online transfer procedure, see the SIMATIC Automation License Manager function manual at Siemens Industry Online Support.

Resolution 2: Offline License Transfer Procedure

Offline transfer uses an export bundle written to a USB stick by the source ALM, which is then imported into the target ALM directly through the import dialog. Crucially, the file is staged on the USB stick by the source ALM, not the target ALM. If the writing side is healthy and the reading side is the failing one, the operation still proceeds. This is the proven path used by the field case and is recommended as the primary remediation.

Procedure (Source PG → USB → Target PG)

  1. On the source PG, open ALM. Right-click the license to transfer. Select License Transfer → Export License. Save as license_export_xxxx.lic on a USB stick. The file is a binary container holding the encrypted license token plus metadata.
  2. Eject the USB stick safely. Insert into the target PG.
  3. On the target PG, open ALM. Use File → Import License (or drag the .lic file into the ALM license window). ALM imports the license into the local vault and the export bundle is consumed on the USB.
  4. Verify in ALM: the license moves from the USB to the local vault. The export bundle is consumed and is no longer visible on the stick.
  5. Restart the target PG and verify TIA Portal V18 sees the license under Help → License Management with status "Available".

Procedure (Source PG → USB C: → Target PG via USB C:)

Use this when the destination USB is a Siemens hard-key with locked write-protect (Cause 2) and the target vault needs to receive the license.

  1. On the source PG, export the license to a USB stick (USB-A). Verify the bundle is on the stick.
  2. On the target PG, use ALM File → Import from USB menu. The import triggers ALM to read the bundle through its own service, bypassing File Explorer shell file write semantics.
Offline transfer does not require E: drive write access at the target. It uses the source ALM write path (which is functional) and the target ALM import path (which reads only and writes to the local vault, not the USB). This is why offline transfer succeeds even when the dialog blocks direct ALM-to-E: writes.

Resolution 3: USB Write-Access Remediation

If offline transfer is not acceptable for operational reasons, fix the local USB write issue directly.

Group Policy Audit

Run from elevated cmd.exe:

gpresult /h gpo_report.html

Inspect the resulting report for policies under Administrative Templates → System → Removable Storage Access. Look for Removable Disks: Deny write access set to Enabled. If active, request an exception from your IT administrator. The matching read policy is Removable Disks: Deny read access; both are commonly bundled in the same GPO.

Registry Check

Inspect:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

If WriteProtect = 1, the OS enforces USB read-only. Set to 0 and reboot. If the key does not exist, OS-level write enforcement is not active and the issue is upstream (driver or GPO).

BitLocker on USB

Run from elevated cmd.exe:

manage-bde -status E:

If the volume reports Conversion Status: Fully Encrypted or Encryption Method: XTS-AES, ALM cannot write without explicit unlock. Run:

manage-bde -off E:

Decryption takes minutes to hours depending on media size. After completion, retry the ALM transfer.

USB Driver Reset

  1. Open devmgmt.msc.
  2. Expand "Disk drives".
  3. Right-click the USB device and select "Uninstall device".
  4. Check "Attempt to remove the driver for this device" if present.
  5. Eject and reinsert the stick. Windows re-enumerates the device and re-binds the drive letter.

If the stick is a Siemens hard-key with vendor-specific driver (SITOP / SINAMICS), do not uninstall the driver; instead reset only the USB enumeration by switching hub port.

Anti-Virus Exclusion

Add the following paths to the EDR exclusion list:

  • C:\ProgramData\Siemens\AutomationLicenseManager\
  • Removable media root (any USB drive letter when transferring)
  • File extension: .lic

Per Siemens Industry Online Support, license files are encrypted XML and not subject to anti-virus quarantine when correctly excluded.

Resolution 4: ALM Service Reset and TIA Portal Repair

If Cause 3 (stale service token) is suspected, reset the ALM service fully.

  1. Close TIA Portal and ALM on the affected PG.
  2. Open elevated cmd.exe and run:
net stop "ALMService" sc delete "ALMService"
  1. Reinstall ALM V6.2 SP4 from the standalone installer. The installer re-registers the service with a fresh token.
  2. Open TIA Portal V18 → Help → License Management → ALM. Confirm the ALM GUI launches without dialog.
  3. Retry the license transfer.

If the dialog persists, the local vault must be cleaned.

  1. Backup the vault:
xcopy /E /H "C:\ProgramData\Siemens\AutomationLicenseManager" "D:\Backup\ALM"
  1. Stop the service:
net stop "ALMService"
  1. Rename the vault directory:
ren "C:\ProgramData\Siemens\AutomationLicenseManager" "AutomationLicenseManager.old"
  1. Restart the service. The vault is re-created empty. Re-import licenses from the backup via the offline procedure.

Verification Steps

  1. Restart ALM (or the ALM service). Confirm the transferred license appears under Active Licenses.
  2. Open TIA Portal V18. The transferred license should appear under Help → License Management with status "Available".
  3. Open a project that requires the license. Confirm the license is consumed and the project opens.
  4. Restart the PG and repeat step 2. A persistent failure here indicates the license was not properly written to the vault.
  5. Disconnect and reconnect the USB dongle. If the license persists in ALM but TIA Portal flags it as missing, the issue is the license-container binding path, not the transfer.

ALM-TIA Portal V18 Compatibility Matrix

TIA Portal Minimum ALM Build Recommended Build Vault Format Notes
V18 base ALM V6.2 ALM V6.2 SP3 V6.2 Initial V18 release
V18 SP1+ ALM V6.2 SP3 ALM V6.2 SP4 V6.2 SP4 addresses Windows 11 USB write regressions
V18 update 4+ ALM V6.2 SP4 ALM V6.2 SP5+ V6.2 Recommended pairing for V18 U4 and later
V17 ALM V6.1 SP2 ALM V6.1 SP9 V6.1 Separate license pool; not interchangeable
V19 ALM V6.3 ALM V6.3 SP1+ V6.3 Vault format not backward compatible
V16 ALM V6.0 SP2 ALM V6.0 SP5 V6.0 Read-only against V6.2 vault

Source for the compatibility matrix: Siemens Industry Online Support TIA Portal readme and SIMATIC Automation License Manager function manual.

Cross-Platform Notes

Windows 10 Source, Windows 11 Target

Windows 11 introduced tightened USB write enforcement through the Smart App Control and the new removable media servicing stack. Offline transfer from Win10 source to Win11 target succeeds because the target uses the ALM import path rather than the OS shell write path. The peer-pair ALM online transfer method also succeeds because both sides operate in service-to-service mode.

Windows Server 2019 / 2022

Server SKUs enforce USB write policy via Desktop Experience pack. Configure Desktop Experience features before ALM installation; otherwise the ALM UI requires the feature install. USB policies are the same as desktop Windows.

Remote Desktop (RDP) Sessions

When the TIA Portal runs inside an RDP session on a server, drive E: mappings on the client are not visible to the RDP session USB stack. Use \tsclient\E from the RDP session or use the offline procedure with a USB attached to the server.

VMware Workstation and Hyper-V VMs

USB passthrough settings must include "Enable USB write access" for the VM. Some hypervisors default to USB read-only when the VM is non-persistent. Verify the VM's USB controller properties before retrying the ALM transfer.

Preventive Best Practices

  1. Always match ALM service pack to TIA Portal service pack within one revision of the released compatibility list.
  2. Document the ALM license server hostname and IP. Set a static DHCP reservation for it.
  3. Maintain at least one secondary PG with an offline license vault backup. This is the proven fallback when USB writes are blocked.
  4. Export the full license vault before every TIA Portal upgrade. The vault is stored under C:\ProgramData\Siemens\AutomationLicenseManager.
  5. When USB licenses are transferred, prefer the offline procedure and verify by importing once and discarding the original.
  6. Engage IT before deployment to whitelist .lic extension in any file integrity monitoring tool.
  7. Restrict USB write policy exclusions to specific USB device instance IDs rather than blanket waiver.
  8. Schedule a quarterly license-vault audit. Export, verify import, and re-key as needed.
  9. Enable ALM Service verbose logging via registry HKLM\SOFTWARE\Siemens\AutomationLicenseManager\TraceLevel = 4 for support escalation artifacts.
  10. Maintain at least one offline license bundle on a write-protected USB stick as a cold standby.

Field-Proven Caveats

  • Reinstalling ALM does not refresh GPO-applied USB write restrictions; the policy is enforced independent of ALM service state.
  • The dialog text "Cannot write to the data medium in drive E:" is identical across all six causes documented above. The text alone is not a diagnostic indicator.
  • BitLocker To Go on USB does not propagate the unlock key to the ALM service. ALM cannot auto-unlock; manual decryption or hardware unlock is required.
  • Defender for Endpoint's Attack Surface Reduction Rule (ASR) can block *.lic without leaving a Defender history record. Verify against the EDR tenant event log.
  • USB 3.0 vs USB 2.0 port switching can change the drive letter on Windows 11. Always use a port on the same hub when reproducing the dialog.
  • Some vendors (SITOP UPS, SINAMICS) ship USB license dongles that respond to a vendor-specific SCSI mode sense command; generic driver resets do not apply.

Command Reference Card

Command Purpose
sc query "ALMService" Verify ALM service state
net stop "ALMService" && net start "ALMService" Restart ALM service
gpresult /h gpo_report.html Capture applicable GPOs
manage-bde -status E: Check BitLocker state of drive E:
manage-bde -off E: Decrypt drive E: (long-running)
net use List mapped network drives
subst List drive letter substitutions
Test-NetConnection -Port 4410 Test ALM server TCP reachability
echo ALM_TEST > E:\write_test.lic OS-level write test
Get-Content "%LOCALAPPDATA%\Siemens\AutomationLicenseManager\Logs\ALMService.log" -Wait Tail ALM service log

Frequently Asked Questions

Why does the error only appear on one PG when the same ALM build is installed on two machines?

The license container is identical and validated by the peer laptop. The fault is local to the failing PG in the write permission chain: USB group policy, driver letter binding, Windows 11 default USB restriction, BitLocker on the USB stick, or anti-virus exclusion list. Test by writing any file to drive E: from File Explorer on the failing PG; if that fails the issue is OS-level, not ALM.

Can I bypass the dialog by reinstalling ALM?

Reinstalling ALM V6.2+SP4 does not change USB write permissions because the ALM service operates under the LocalSystem account and writes through the same OS-level USB stack. If the test file write fails at the OS level, ALM reinstall will not help. Use the offline license transfer procedure as the proven workaround.

Which is faster for license transfer: online ALM or offline export?

Online ALM completes within seconds if both ALM services are running on the same VLAN and port 4410/TCP is open. Offline transfer involves human intervention (file copy and USB swap) and is slower but does not depend on network paths. For repeated transfers, configure a static ALM server; for occasional use, offline transfer is more reliable.

Why did the offline transfer work between Windows 10 and Windows 11?

Offline transfer writes the export file to the USB stick from the source ALM and imports on the target ALM. The write path is the ALM service on the source side, not the ALM service on the target. The target ALM reads the bundle and writes to its local vault (C:\ProgramData\Siemens\AutomationLicenseManager), bypassing the USB E: write path entirely. Windows 11 handles file reads differently than writes, so the read on the target succeeds where the direct write fails.

What version of ALM ships with TIA Portal V18?

TIA Portal V18 ships with ALM V6.2 by default. Service Pack 4 (V6.2+SP4) addresses early V18 USB write regressions on Windows 10 22H2 and Windows 11 22H2/23H2. Match the ALM build to the TIA Portal build; verify via ALM Help → About → Build. Refer to the SIMATIC Automation License Manager documentation on Siemens Industry Online Support for the latest compatible SP.

Does the error affect floating network licenses only?

No. The dialog appears on all transfer paths whose destination is drive E:, including master seat, upgrade, and floating license packages. The fault is destination-media, not license-type. Floating network licenses served by a separate ALM server are unaffected because the destination is the vault, not the USB.

Can I delete drive E: mapping to fix the issue?

Only if E: is a network share substitution. Open diskmgmt.msc to verify whether E: is mapped to a physical USB device. If subst or net use shows E: as a substitution or share, the dialog arises because CIFS does not honor journaled writes. Remove the substitution with subst E: /d or the share with net use E: /delete before retrying ALM.

Back to blog