Resolving TIA Portal V13 Uninstall Failure and Crash Recovery

David Krause17 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

1. Problem Overview

When TIA Portal V13 (Totally Integrated Automation Portal) refuses to launch the project view, terminates immediately, or simply will not uninstall through the Windows Control Panel, the conventional installer-driven removal path is broken. Engineers working on STEP 7 V13, WinCC V13, Safety Integrated V13, or PLCSIM V13 frequently encounter this scenario after aborted updates, anti-virus interference, power loss during an installation transaction, or an attempted in-place upgrade to a newer TIA version that left behind ghost references.

The symptom set is highly recognizable:

  • Project view fails to open; the main IDE closes within a few seconds without a useful dialog
  • The TIA Portal shortcut launches the splash screen, then exits with no error
  • Setup.exe does not start when re-invoked from the original installation media
  • The "Uninstall" entry in the Windows Control Panel either does nothing, throws a missing-MSI error, or is greyed out
  • Re-running Setup.exe with the /repair switch exits silently with exit code 0x643 or 0x80070005
  • Multiple TIA packages (STEP 7 V13, WinCC V13, Safety Integrated V13, PLCSIM V13) all share the same symptom set because they share the same central inventory log
Affected versions: TIA Portal V13 (initial release), V13 SP1, and V13 SP2 with their corresponding STEP 7, WinCC, and Safety Integrated add-on packages. The cleanup procedure described in this article is identical for all three service packs. For V14 and later, the SIMATIC Management Console and a structured removal script provide a more graceful path, but the manual approach below remains the field-proven fallback for the V13 line.

2. Root Cause Analysis

Several conditions can leave TIA Portal V13 in an un-uninstallable state. Most originate from a single source: a corrupted or stale MergeSysLib.log that the installer uses to reconcile the installed package set.

Root Cause Detection Method Impact on Uninstaller
Broken MergeSysLib.log Inspect C:\Program Files\Common Files\Siemens\Automation\bin\ for a 0 KB file or a timestamp older than the last successful install Installer cannot reconcile installed TIA packages and exits
Corrupted MSI database entries Look for missing or duplicated GUIDs in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Control Panel Uninstall entry does nothing or shows a missing MSI error
Locked TIA background services services.msc shows S7TraceServiceSrv or the Automation License Manager service still running with PID-holding file handles Files in use; Setup.exe aborts the removal transaction
Orphaned Automation License Manager service Service stopped but binary still present; Service Control Manager logs event ID 7000 on start attempts Re-installation detects ghost install and refuses to proceed
Incomplete earlier upgrade Windows Event log shows "Product: SIMATIC TIA Portal V13 -- Configuration failed" with Event ID 1035 from MsiInstaller Both repair and uninstall are blocked because the transactional state is mid-flight
Anti-virus file locks Sysinternals Process Explorer shows avp.exe or similar holding handles to .msi and .dll files inside C:\Program Files\Siemens\Automation Setup.exe cannot rename or delete files and rolls back the transaction

The merge module library is the central catalog of every TIA Portal add-on (STEP 7, WinCC, Safety Integrated, PLCSIM, OBA, Drive ES Basic). When MergeSysLib.log is corrupted, the installer loses the dependency graph it needs to determine which packages to remove and in which order. Manually renaming or moving the log forces a re-scan during the next setup invocation, which is the single highest-yield action in the entire recovery procedure.

3. The MergeSysLib.log - In-Depth Analysis

MergeSysLib.log is the inventory log that the TIA Portal installer creates and updates every time a Siemens automation package is installed, modified, or removed. The file is stored at:

C:\Program Files\Common Files\Siemens\Automation\bin\MergeSysLib.log

It is shared by all TIA-family products installed on the machine. If STEP 7 V13 and WinCC V13 are both present, both contribute entries to the same log. If the log is missing or unreadable, every subsequent install, repair, or uninstall operation fails at the dependency-resolution stage.

The log serves three purposes:

  1. Installed product catalog: Tracks the GUIDs of every installed TIA-related MSI package so Setup.exe can build a coherent transaction list during install, modify, or remove operations.
  2. Merge module reconciliation: Records merge module actions for shared Windows components (Visual C++ redistributables, .NET Framework assemblies, OPC DA/UA runtimes) to prevent version rollback or duplicate registration.
  3. Cross-package dependency resolution: Provides dependency information for cross-package references such as WinCC Professional V13 requiring STEP 7 Professional V13 base components, or Safety Integrated V13 requiring the F-CPU support libraries from STEP 7.

The log is not a project file, not a settings file, and not a license file. It contains no user data, no PLC programs, and no HMI screens. Deleting or renaming the file is safe and forces the next Setup.exe to rebuild the dependency map from scratch by scanning the registry and the file system. Therefore removing or renaming the log alone is the recommended first recovery step when the uninstaller cannot reconcile the install state.

Critical: If WinCC V13 (any edition: Flexible, Comfort, or Professional) is installed alongside STEP 7 V13, the same MergeSysLib.log governs WinCC. You must also remove WinCC V13 using the same procedure or the rebuilt log will continue to reference a missing WinCC MSI, which prevents STEP 7 from re-installing cleanly. The mergesys.lib infrastructure is shared by all TIA SW packages including STEP 7, WinCC, and Safety Integrated.

4. Prerequisites

  1. Administrator-level Windows account (mandatory for service control, registry edits, and folder ownership changes).
  2. Original TIA Portal V13 installation media (DVD, mounted ISO, network share, or the original download archive) with valid license keys for STEP 7, WinCC, Safety Integrated, and any add-on packages.
  3. At least 30 GB free on the system drive for cached installation files, project backups, and Windows installer staging.
  4. Stable power or a UPS for desktop workstations. Registry edits and service stops should not be interrupted mid-operation.
  5. Inventory of installed sub-packages: STEP 7 Professional V13, STEP 7 Basic V13, WinCC V13 (Flexible, Comfort, or Professional), Safety Integrated V13, PLCSIM V13, TIA Portal Multiuser Engineering, Drive ES Basic V13. Record the version, service pack, and any applied updates (for example, V13 SP1 Update 5).
  6. Process Explorer from Sysinternals (or familiarity with built-in Task Manager and tasklist) for forced termination of locked processes and identification of file-holding executables.
  7. Pen and paper (or a text file on a USB stick) to record registry key paths, service names, and MSI GUIDs as you encounter them.

5. Pre-Cleanup Backup Procedure

Before any destructive operation, capture the current state. This is non-negotiable; once MergeSysLib.log is removed and registry keys are deleted, recovering the original install graph is not possible without a backup.

  1. Export the Siemens Automation registry tree: regedit /e C:\TIA_BACKUP\tia_hklm_automation.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\Automation" regedit /e C:\TIA_BACKUP\tia_hklm_wow64_automation.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Siemens\Automation" regedit /e C:\TIA_BACKUP\tia_hkcu_automation.reg "HKEY_CURRENT_USER\SOFTWARE\Siemens\Automation"
  2. Copy the entire automation directory tree to an external drive: robocopy "C:\Program Files\Siemens\Automation" "E:\TIA_BACKUP\ProgramFiles_Siemens" /E /Z /R:3 /W:5 robocopy "C:\Program Files (x86)\Siemens\Automation" "E:\TIA_BACKUP\ProgramFiles_x86_Siemens" /E /Z /R:3 /W:5 robocopy "C:\Program Files\Common Files\Siemens" "E:\TIA_BACKUP\CommonFiles_Siemens" /E /Z /R:3 /W:5
  3. Archive all TIA project files with the .zap13 extension located under C:\Users\<user>\Documents\Automation and any custom libraries. These are project archives and will not be touched by the cleanup, but they should be backed up off-machine as a matter of course before any major intervention.
  4. Record the Automation License Manager (ALM) license inventory: open the ALM control panel, select "All Licenses", screenshot the window, and export the list to a text file using the ALM command-line interface: "C:\Program Files (x86)\Siemens\Automation\Licensing\bin\almsrv.exe" -list
  5. Create a Windows system restore point named "Pre-TIA-V13-Cleanup" so that any unintended consequence can be rolled back without rebuilding the OS.

6. Stopping TIA-Related Services and Processes

Stop every service that holds file handles inside the Siemens Automation folder tree. Open an elevated command prompt and execute:

net stop "S7TraceServiceSrv" net stop "automation license manager service" net stop "S7DOSHelpSrv" net stop "SNMP\EXT\TrapSrv"

Some installations also include additional TIA administrator and trace helper services. Enumerate all Siemens-related services:

sc query state= all | findstr /I "siemens simatic s7 tia almsrv"

For each service discovered, stop it with net stop <name> or set its start type to "disabled" with:

sc config "<ServiceName>" start= disabled

For stubborn processes, open Task Manager as administrator and end the following executables if they are present:

  • S7TraceServiceSrv.exe
  • ALM.exe (Automation License Manager)
  • almsrv.exe (ALM service host)
  • S7TIAOamSrv.exe
  • TiaShellSrv.exe
  • Siemens.Automation.ObjectFrame.RuntimeHost.exe
  • Setup.exe or any residual Siemens * MSI installers that may still be running from a previous aborted install

Confirm the process tree is clean using the Windows Imaging API tool or simply:

tasklist /FI "IMAGENAME eq S7TraceServiceSrv.exe" tasklist /FI "IMAGENAME eq TiaShellSrv.exe"

Both should return "INFO: No tasks are running which match the specified criteria."

7. Step-by-Step Manual Uninstallation Procedure

7.1 Rename the MergeSysLib.log

  1. Close all Siemens applications including TIA Portal, WinCC Explorer, Automation License Manager, and any open Setup.exe dialogs.
  2. Open Windows Explorer with administrative elevation (right-click Explorer, "Run as administrator").
  3. Navigate to C:\Program Files\Common Files\Siemens\Automation\bin\.
  4. Right-click MergeSysLib.log and select "Rename". Change the name to MergeSysLib.log.bak. Do not delete it yet; if the rebuild fails, the original can be restored.
  5. Verify the file is no longer in its original name by listing the directory: dir "C:\Program Files\Common Files\Siemens\Automation\bin\" /a

7.2 Invoke the Installer Repair Path

  1. Mount the TIA Portal V13 installation media. If the media is on a network share, copy the entire DVD contents to a local folder first to avoid ACL and path-length issues.
  2. Open an elevated command prompt.
  3. Run D:\Setup.exe /repair (substitute the media drive letter or the local folder path).
  4. If the repair dialog appears, choose "Repair" and follow the prompts. Allow the repair to complete, then reboot.
  5. If Setup.exe still does not start, proceed to Section 7.3.

7.3 Remove Individual MSIs via the Registry

When the high-level setup GUI is broken, fall back to MSI-level removal. First, list every TIA-related MSI GUID currently registered in the Windows Installer database:

reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /f "Siemens" reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" /s /f "Siemens"

Each sub-key returned is a GUID of an installed MSI. The DisplayName value will identify whether the MSI is STEP 7, WinCC, Safety Integrated, PLCSIM, TIA Portal framework, or an update package. For each matching GUID, perform a quiet uninstall and capture a detailed log:

msiexec /x {GUID} /qb REBOOT=ReallySuppress /L*v "C:\temp\tia_remove_{GUID}.log"

Always uninstall in the correct dependency order: TIA Portal base framework first, then add-on packages (PLCSIM, Safety Integrated), then STEP 7 Professional, then WinCC. If the dependency order is wrong, the uninstall will fail with error 2343 referencing a missing dependency.

7.4 Remove TIA-Related Registry Keys

After package removal, delete the following registry trees. Because the Automation sub-tree may be shared with other Siemens products (SIMATIC Energy Manager, RUGGEDCOM tools, SINEC), the safest path is to rename the key rather than delete it; if the system remains stable for 7 days, the renamed key can then be deleted.

reg rename "HKLM\SOFTWARE\Siemens\Automation" "Automation_TIA_Backup" reg rename "HKLM\SOFTWARE\Wow6432Node\Siemens\Automation" "Automation_TIA_Backup" reg rename "HKCU\SOFTWARE\Siemens\Automation" "Automation_TIA_Backup"

If you are certain no other Siemens software depends on the shared entries, delete outright:

reg delete "HKLM\SOFTWARE\Siemens\Automation" /f reg delete "HKLM\SOFTWARE\Wow6432Node\Siemens\Automation" /f reg delete "HKCU\SOFTWARE\Siemens\Automation" /f
Caution: Only remove the \Automation sub-tree if you are certain no other Siemens software (for example, SIMATIC Energy Manager, RUGGEDCOM tools, SINEC NMS) depends on the shared registry entries. When in doubt, rename the key with reg rename to Automation_TIA_Backup rather than deleting it. Restoring the key is as simple as renaming it back.

7.5 Delete Installation Folders

Remove the following directories if they are still present after the MSI removals:

  • C:\Program Files\Siemens\Automation
  • C:\Program Files (x86)\Siemens\Automation
  • C:\Program Files\Common Files\Siemens
  • C:\ProgramData\Siemens (hidden folder; enable "View hidden items" in Explorer)
  • C:\Users\<user>\AppData\Local\Siemens
  • C:\Users\<user>\AppData\Roaming\Siemens

For locked files or folders where the SYSTEM account retains ownership, take ownership and grant the local Administrators group full control:

takeown /f "C:\Program Files\Siemens\Automation" /r /d y icacls "C:\Program Files\Siemens\Automation" /grant Administrators:F /t

Then delete the tree:

rmdir /S /Q "C:\Program Files\Siemens\Automation" rmdir /S /Q "C:\Program Files (x86)\Siemens\Automation" rmdir /S /Q "C:\Program Files\Common Files\Siemens"

7.6 Remove Environment Variables and Scheduled Tasks

TIA Portal V13 occasionally creates system-wide environment variables. Inspect and remove any leftover Siemens entries:

set | findstr /I "siemens simatic tia"

Remove the matching variables through System Properties > Environment Variables, or with setx /m SIEMENS_AUTOMATION_PATH "" for a system-wide variable, or reg delete "HKCU\Environment" /v <name> /f for a user-scoped variable.

Remove any scheduled tasks created by the installer:

schtasks /delete /tn "SIMATIC TIA Portal" /f schtasks /delete /tn "Siemens ALM Refresh" /f schtasks /query | findstr /I "siemens simatic tia"

8. Reinstalling TIA Portal V13

  1. Reboot the workstation to release any residual file locks and to allow the renamed MergeSysLib.log to be safely removed if the rebuild did not recreate it.
  2. Confirm the cleanup is complete by re-running the verification commands in Section 9.
  3. Insert or mount the TIA Portal V13 media (original DVD, ISO, or local copy of the DVD contents).
  4. Run Setup.exe as administrator.
  5. Accept the license agreement and select the products to install. Match the package list you recorded in Section 4 (Prerequisites).
  6. When prompted, transfer licenses from the ALM backup, or re-activate using the original license keys via the Automation License Manager.
  7. Allow the installer to complete the system configuration phase (registry, services, firewall rules for WinCC, OPC DA/UA port registration).
  8. Do not interrupt the installer once it has entered the "Configuring your system" phase. Interruption at this point will re-create the broken MergeSysLib.log state.
  9. When the installer reports success, reboot before launching TIA Portal for the first time.
Compatibility note: For Windows 10 and Windows 11, ensure that the .NET Framework 4.6.x and 4.7.x features are enabled in the operating system. TIA Portal V13 was originally targeted at Windows 7 SP1; with the V13 SP1 Update 9 patch, the platform supports Windows 10 build 1703 and later. Windows 11 requires V13 SP2 Update 8 or later. Refer to the official compatibility list on the Siemens Industry Online Support portal before installing on a non-validated OS. The product page at siemens.com/tia-portal provides links to current TIA Portal versions.

9. Verification Matrix

Check Command / Action Expected Result
Registry removed or renamed reg query "HKLM\SOFTWARE\Siemens\Automation" ERROR: The system was unable to find the specified registry key or value
Services removed or disabled sc query "S7TraceServiceSrv" 1060: The service is not installed
Folder removed Browse to C:\Program Files\Siemens\Automation Path does not exist
Setup launches Run Setup.exe from media or local copy Setup dialog appears, language selection shown
Project view opens Open TIA Portal, create a new project, click "Project view" Project tree on the left, hardware catalog on the right, no crash
WinCC Runtime starts Open WinCC Explorer, load a test project, click "Activate" Runtime starts without ALM error 1053 or service start failure
ALM shows licenses Open Automation License Manager, click "All Licenses" License list matches the inventory recorded in Section 5

10. Common Pitfalls and Recovery

10.1 Setup.exe Does Not Start After Manual Cleanup

If the media is on a network share with restrictive ACLs, copy the entire DVD contents to a local folder first. Setup.exe reads configuration from a relative setup.ini; if it is missing or unreadable, the launcher silently exits. Verify setup.ini is present and not zero bytes:

dir D:\setup.ini

10.2 WinCC V13 Left Behind After STEP 7 V13 Removal

Removing STEP 7 V13 but leaving WinCC V13 produces a half-broken WinCC configuration. Either remove both packages or keep both. WinCC V13 cannot operate without the STEP 7 V13 base, and STEP 7 V13 will not re-install cleanly while WinCC V13 references are still active. Always uninstall in reverse dependency order.

10.3 OPC DA / UA Server Conflicts

TIA Portal V13 installs the OPC UA stack in the Common Files folder. If a third-party OPC server (Kepware, Matrikon, Softing) is installed, the cleanup may not fully remove the UA discovery server registration. Use net stop OpcEnum and inspect HKLM\SOFTWARE\OPC Foundation for orphaned references. Only remove the OPC Foundation key if no third-party OPC server is present.

10.4 Automation License Manager Service Will Not Start After Reinstall

After cleanup and reinstall, the ALM service may fail to start with error 1053 ("The service did not respond to the start or control request in a timely fashion"). Manually re-register the ALM service:

cd "C:\Program Files\Common Files\Siemens\Automation\Licensing\bin" almservice.exe -install net start "automation license manager service"

10.5 Unified Write Filter (UWF) Interference on Industrial PCs

On industrial PCs with the Unified Write Filter enabled (Windows 10 IoT, Windows Embedded Standard 7, Windows 11 IoT), file deletions in protected paths are silently discarded on the next reboot. Either disable UWF through uwfmgr filter disable and reboot, or perform the cleanup from a non-overlay command prompt after exempting the Siemens folders:

uwfmgr file add-exclusion "C:\Program Files\Siemens\Automation" uwfmgr file add-exclusion "C:\Program Files\Common Files\Siemens" uwfmgr filter disable

10.6 Antivirus Holding Files Open

Symantec Endpoint Protection, McAfee, and Windows Defender real-time scanning frequently hold read or delete-on-write handles on .msi and .dll files inside the Siemens folder tree. Add the Siemens folders to the antivirus exclusion list before uninstalling or reinstalling:

Add-MpPreference -ExclusionPath "C:\Program Files\Siemens\Automation" Add-MpPreference -ExclusionPath "C:\Program Files\Common Files\Siemens"

11. Best Practices and Preventive Maintenance

  • Maintain a TIA Portal installation log book with the date, version, applied updates, and any deviations from the default install path. This is invaluable when a re-install is required and the original installer media is no longer in the engineer's hands.
  • Apply updates in order: V13 base install first, then SP1, then SP2, then the latest available update (for example, V13 SP2 Update 9). Skipping updates is not supported and leads to dependency-graph mismatches.
  • Create a system image (Windows Backup, Acronis, Veeam Agent, or a vendor-specific IPC imaging tool) before each major TIA Portal update or after a fresh install. Restoring a 30 GB image is faster than troubleshooting a broken install.
  • Disable antivirus real-time scanning of C:\Program Files\Siemens\Automation and C:\Program Files\Common Files\Siemens during install and uninstall operations. Resume real-time scanning after the install is complete and the system has been rebooted.
  • Back up MergeSysLib.log after every successful install. A known-good log can be restored if a future install attempt corrupts it, saving several hours of troubleshooting.
  • Document the SIEMENS_AUTOMATION_PATH environment variable and the location of .zap13 project archives. The default path C:\Users\<user>\Documents\Automation can be relocated by a previous install, and locating user projects after a crash often takes longer than the recovery itself.
  • Test the uninstall path periodically on a non-production engineering workstation. A clean TIA Portal V13 install should be removable through Control Panel within 30 minutes. If the standard uninstall fails on a fresh install, the media is likely damaged.

12. Frequently Asked Questions

What is the MergeSysLib.log file and is it safe to delete?

MergeSysLib.log is the central inventory log that the TIA Portal installer uses to track every installed Siemens automation package, including STEP 7, WinCC, Safety Integrated, PLCSIM, and OBA. Deleting or renaming the file is safe and forces Setup.exe to rebuild the dependency map on the next run. It will not affect WinCC Flexible (the V7.x line), WinCC Explorer (the V6.x line), or any non-TIA Siemens software.

Why does the TIA Portal V13 setup fail to launch even from the original DVD?

Common causes include a stale MergeSysLib.log pointing to missing MSIs, locked files held by the S7TraceServiceSrv or Automation License Manager service, missing prerequisite runtime libraries (VC++ 2010 SP1, .NET 4.6), and antivirus real-time scanning holding file handles. Stop all TIA-related services, rename MergeSysLib.log, add the Siemens folders to the antivirus exclusion list, and re-run Setup.exe with administrative elevation.

Do I have to uninstall WinCC V13 if I am only troubleshooting STEP 7 V13?

Yes, if WinCC V13 (any edition: Flexible, Comfort, or Professional) was installed alongside STEP 7 V13. Both packages share the same MergeSysLib.log. Removing only STEP 7 leaves WinCC references in the log, which prevents a clean reinstall of either product. Use the same msiexec /x {GUID} /qb approach for each WinCC V13 MSI listed in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.

How can I find the GUID of an installed TIA Portal package?

Open an elevated command prompt and run reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /f "Siemens" and the Wow6432Node equivalent. Each sub-key that returns a DisplayName containing "SIMATIC", "STEP 7", "WinCC", "Safety", "PLCSIM", or "TIA Portal" contains a GUID in the key path. You can then run msiexec /x {GUID} /qb REBOOT=ReallySuppress /L*v C:\temp\remove.log to remove that specific package with a detailed log.

Is there an official Siemens cleanup tool for TIA Portal V13?

Siemens does not ship a public "uninstall everything" utility for V13. The supported path is to use the original Setup.exe with the /repair or /uninstall switch. When Setup.exe itself is broken, the manual procedure (stop services, rename MergeSysLib.log, run msiexec /x for each package GUID, remove registry keys, delete folders) is the field-proven fallback that restores a clean state. For the most current TIA Portal versions and official uninstall utilities, consult the Siemens Industry Online Support portal.

Back to blog