Resolving TIA Portal V15 HMI VB Script Compilation Failures

David Krause12 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 Overview

Engineers running TIA Portal V15 (build 15.0.x.x without service pack) on Windows 10 Pro encounter two interrelated failures after side-loading TIA Portal V13 SP1 on the same workstation:

  1. HMI compile errors on any project containing VB scripts (WinCC Comfort/Advanced, WinCC Professional RT/ES, or Panel Image VB).
  2. The TIA Portal Setup wizard exits silently after the splash screen, blocking both Repair Installation and Update 3 installer flows.

The first symptom manifests in the TIA Portal compile output window as:

Compilation failed. Please contact Siemens customer support.

The second symptom shows a brief splash screen with the Siemens logo, then the process terminates without displaying the setup dialog tree. The TIA Setup process (Siemens.Automation.Setup.exe) starts but does not reach the language selection page.

Both failures share a single root cause: a corrupted or hybrid 32-bit/64-bit Siemens component registration in the Windows registry, COM catalog, and shared assembly cache. They are not random bugs in V15; they are typical fallout from running a V13 SP1 (32-bit) installation side-by-side with a V15 (64-bit) installation when the V15 entry was not updated.

Symptoms and Error Messages

The combination of symptoms is the fingerprint of the component-registration class of failure. Capture all of the following to confirm the diagnosis:

Symptom Location Typical Indicator
HMI compile aborts with VB script TIA Portal > Compile > Output window "Compilation failed. Please contact Siemens customer support."
HMI compile succeeds without VB scripts Same project, scripts removed Clean compile, .hmi_cab generated
Setup wizard exits after splash Start menu > Siemens Automation > Setup Splash visible, no dialog tree, no error
Setup wizard exits after splash Right-click Setup > Run as administrator Same behavior, no UAC prompt retained
Event Viewer Application log Windows Event Viewer > Application Source .NET Runtime / Application Error referencing Siemens.* assembly
TIA Portal V13 SP1 still launches Desktop shortcut to V13 SP1 Opens normally; compiles V13 SP1 projects successfully
Diagnostic rule: if V13 SP1 still functions but V15 fails on every project that contains a script, the failure is not project-related. It is environmental.

Root Cause Analysis

TIA Portal V13 SP1 is delivered as a 32-bit application. TIA Portal V14 and later (V15 included) are 64-bit applications. Both families register COM components, .NET assemblies, and Windows shell extensions under different registry paths and different WOW64 redirection contexts.

Component Registration Conflict

When V13 SP1 is installed after V15 (or installed side-by-side without using a clean V15 repair), the 32-bit installer rewrites overlapping GUIDs in:

  • HKEY_CLASSES_ROOT\CLSID (32-bit view under WOW6432Node)
  • HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\Automation
  • The .NET Global Assembly Cache (C:\Windows\Microsoft.NET\assembly\GAC_32 and GAC_64)
  • Shared setup metadata under %ProgramData%\Siemens\Automation

The V15 HMI VB script compiler resolves script assemblies through COM activation. When the COM registration points to a 32-bit inproc server but the TIA V15 process is 64-bit, activation throws REGDB_E_CLASSNOTREG (HRESULT 0x80040154), which the HMI compile wrapper surfaces to the user as the generic "Compilation failed" message. The Setup wizard fails for the same reason: the setup bootstrapper calls into the same COM components to enumerate installed products.

Why "Repair" Alone Is Not Enough

The Setup wizard's Repair action is the correct procedure per Siemens documentation, but the wizard itself cannot start because its own bootstrapper depends on the broken registration. This is a classic bootstrap dependency: you cannot run repair because repair is what you need. The workaround is to break the cycle by either:

  1. Calling the Setup with explicit logging to bypass the UI, or
  2. Running a clean uninstall from the cached installer repository and then reinstalling.

Pre-Repair Checklist

Before any repair attempt, capture the current state. This lets you roll back if the procedure makes things worse.

  1. Export the registry hive:
    reg export HKLM\SOFTWARE\Siemens C:\backup\siemens_hklm.reg /y
    reg export HKCU\SOFTWARE\Siemens C:\backup\siemens_hkcu.reg /y
    reg export HKLM\SOFTWARE\WOW6432Node\Siemens C:\backup\siemens_wow64.reg /y
  2. Back up project archives: open every V15 project, execute Project > Archive, and store the .zap15 files outside %ProgramFiles%\Siemens\Automation.
  3. Snapshot the install state: copy %ProgramData%\Siemens\Automation to C:\backup\Automation_state.
  4. Verify Windows event logs are enabled and not overwritten, so post-repair verification is meaningful.
  5. Disable AV real-time scanning temporarily. Some endpoint protection products quarantine Siemens.Automation.Setup.exe mid-init when its hash changes during a partial install.
  6. Confirm admin context. Open cmd as administrator and run whoami /groups | findstr /i "S-1-16-12288". A match confirms full admin token elevation (UAC high integrity).

Diagnostic Verification

Confirm the diagnosis before touching the installer. Run the following checks:

Check 1: Process Bitness

Open Task Manager > Details, start TIA Portal V15, and confirm the process S7DOTWX.EXE or Siemens.TIA.Portal.exe shows Platform: 64-bit.

Check 2: COM Class Registration

Open an elevated cmd.exe and run:

reg query "HKCR\CLSID\{00000000-0000-0000-0000-000000000000}" /s

Substitute the GUIDs of known Siemens HMI COM classes if available. Any entry pointing to C:\Program Files (x86)\Siemens\... inside a 64-bit V15 process path is the smoking gun.

Check 3: Script Compile Dependency

In a V15 project, add a one-line VB script under HMI tags > Scripts:

Sub Test()
    MsgBox "Hello"
End Sub

Compile. If the error reproduces, switch the project's HMI runtime to a target that does not use VB (e.g., a KTP700 Basic with no scripting). If compile succeeds, the COM path is the confirmed failure point.

Solution 1: Silent Repair of V15 Installation

The Setup wizard has a silent mode that bypasses the broken UI bootstrap. This is the recommended first attempt because it does not remove project data.

  1. Locate the original V15 installer folder or extract the ISO to a local path, e.g., D:\Install\TIA_V15.
  2. Open cmd.exe as administrator.
  3. Run the bootstrapper with the repair switch and a verbose log:
"D:\Install\TIA_V15\Setup\Setup.exe" /repair /silent /log"C:\backup\tia_repair.log"

Siemens Setup supports the /repair switch through the Siemens.Automation.Setup infrastructure, which reinstates missing or overwritten files without touching user projects. According to the official Siemens documentation, "You have the option to repair installed products by completely reinstalling them using the setup program," which restores the registry entries the V13 SP1 install clobbered.

  1. Wait for the silent run to finish. The log file lists the components repaired and the registry keys rewritten.
  2. Reboot the workstation. Component registration is cached; a reboot forces re-resolution.
  3. Re-launch TIA Portal V15 and re-run the HMI compile.

If silent repair completes with "0" return code and the HMI VB compile succeeds, stop here. Otherwise proceed to Solution 2.

Solution 2: Clean Reinstall of V15

When silent repair fails (e.g., the bootstrapper itself cannot start because the V13 SP1 install left partial MSI entries), uninstall V15 fully and reinstall. Uninstall in the correct order matters: uninstall V13 SP1 first, then V15. Uninstalling V15 while V13 SP1 is still installed leaves orphaned 64-bit entries that V13 SP1 cannot clean up.

  1. Open Control Panel > Programs and Features and uninstall TIA Portal V13 SP1. Reboot.
  2. Uninstall TIA Portal V15. Reboot.
  3. Delete residual folders:
rd /s /q "%ProgramFiles%\Siemens\Automation"
rd /s /q "%ProgramFiles(x86)%\Siemens\Automation"
rd /s /q "%ProgramData%\Siemens\Automation"
rd /s /q "%LOCALAPPDATA%\Siemens\Automation"
  1. Remove leftover Siemens registry keys (after exporting the backup taken in the pre-repair step):
reg delete "HKLM\SOFTWARE\Siemens\Automation" /f
reg delete "HKLM\SOFTWARE\WOW6432Node\Siemens\Automation" /f
reg delete "HKCU\SOFTWARE\Siemens\Automation" /f
  1. Restart Windows fully (not sleep, not sign-out). Microsoft support notes that a full power-cycle restart is sometimes required for the installer to pick up a clean component state.
  2. Reinstall TIA Portal V15 from the original media. Install V13 SP1 only after V15 reaches a usable state, and only if you actually need both.
Important: do not install V13 SP1 and V15 on the same engineering workstation unless a specific multi-version use case exists. Siemens officially supports parallel installations only for specific version pairs documented in the V15 readme. The cleanest workflow is one TIA Portal per workstation, ideally in a VM.

Solution 3: Repair the COM Registration Directly

If neither silent repair nor clean reinstall is acceptable (e.g., V13 SP1 must remain installed), the alternative is to selectively repair the 64-bit COM entries without removing V13 SP1.

  1. Identify the affected Siemens COM classes. A typical entry for the HMI VB script engine looks like:
HKEY_CLASSES_ROOT\CLSID\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
    InprocServer32 = "C:\Program Files\Siemens\Automation\HMI\VBScriptEngine.dll"
  1. If the InprocServer32 value points to C:\Program Files (x86)\Siemens\..., correct the path to the 64-bit location. Export the key first as a safety backup.
  2. Re-register the corrected DLLs from an elevated cmd.exe:
cd /d "C:\Program Files\Siemens\Automation\HMI"
for %i in (*.dll) do regsvr32 /s "%i"
  1. Clear the .NET assembly cache for the HMI script assemblies. Use gacutil.exe from the V15 SDK if present, or use the GUI installer to refresh GAC entries.
  2. Reboot and re-test.

This solution is high-risk and is intended for engineers with explicit knowledge of the COM class GUIDs. Incorrect edits to HKCR\CLSID can destabilize the entire TIA Portal installation.

Verification

After any of the three solutions, run the following verification matrix before declaring the issue resolved.

Check Procedure Pass Criteria
HMI VB compile Open a V15 project with a one-line VB script on a Comfort Panel target. Compile. Output shows "Compile (n out of n) successful", no "Compilation failed" line.
Setup wizard launches Start menu > Siemens Automation > Setup Setup dialog tree appears, not just splash.
Update 3 install From Setup, run Update 3 install. If no license, perform a dry-run / change install. Setup completes, V15 reported at build 15.0.3.x or higher.
Event Viewer clean Filter Application log for "Source = .NET Runtime" and "Source = Application Error" with "Siemens" in description, post-test. No new entries with timestamp after the repair.
V13 SP1 (if retained) Launch V13 SP1, open a V13 SP1 sample project, compile. Compiles successfully; V13 SP1 path under Program Files (x86) unchanged.

Prevention and Multi-Version Best Practices

Most V15 / V13 SP1 conflicts are avoidable by following a disciplined install order and isolating versions where practical.

Install Order Discipline

Always install the oldest TIA Portal version first, then newer versions. V13 SP1 must precede V15 on the same workstation if both must coexist. Reversing the order forces the newer install to overwrite shared 32-bit entries that the newer 64-bit build does not own.

Use Virtual Machines for Multi-Version Workloads

The supported and recommended pattern for engineers who must work in V13 SP1, V15, and V16+ concurrently is one Windows VM per major version. Hyper-V, VMware Workstation, and VirtualBox are all supported as long as the VM has a fixed CPU feature set and at least 16 GB of disk per VM. This eliminates all component-registration cross-talk.

Service Pack Hygiene

TIA V15 without a service pack is end-of-support. Update 3 (V15.0.3) and Update 4 (V15.1) include the cumulative HMI VB compiler fixes, the V15.1 setup wizard bootstrapper rewrite, and updated COM registration blocks. Migrate to V15.1 or later whenever the project schedule allows.

Windows 10 Build Compatibility

TIA V15 is qualified for Windows 10 builds 1607 through 1909. Windows 10 20H2 and later are not officially supported on V15 without Update 4. Verify the OS build with winver before any repair attempt. If the build is newer than 1909, upgrade TIA to V16 or later rather than attempting a repair on V15.

HMI VB Script Compilation: Project-Specific Checks

Even on a clean V15 install, certain VB script patterns trigger compile failure messages that are indistinguishable from the COM-registration bug above. After repairing the install, eliminate project-side causes by checking:

  • Missing references. Open the HMI script editor and confirm every References entry resolves. A broken reference is the single most common cause of the "Compilation failed" message.
  • Unsupported APIs. VB on Comfort/Advanced panels supports a subset of VBScript. Calls to CreateObject, file system objects, and shell APIs are blocked at compile time.
  • Target runtime mismatch. A script that compiles for WinCC RT Advanced can fail on WinCC RT Professional because the Professional COM host is stricter. Check the panel target before assuming a real failure.
  • Locale separators. TIA V15 with German locale treats comma as decimal separator. A script with literal numeric values that uses a dot separator can fail to compile on regional settings. Force English (United States) project locale in Project > Properties > Locale to isolate.

Troubleshooting Matrix

Failure Likely Cause First Action Fallback Action
HMI VB compile fails, V15 launches normally Broken COM ref for script engine Run Setup /repair /silent Clean reinstall of V15
Setup wizard exits after splash Bootstrapper depends on broken COM Silent repair via Setup.exe Clean uninstall of V13 SP1 first, then V15
Update 3 install fails mid-file AV quarantine of setup binary Whitelist %ProgramFiles%\Siemens Disable real-time AV, retry
Both V13 SP1 and V15 broken after install V13 SP1 installed after V15 Uninstall V13 SP1, repair V15 Full clean reinstall of both in correct order
Compile fails only on one project Project reference or locale issue Strip scripts, retest Inspect references; set project locale to en-US
V15 process launches as 32-bit WOW64 redirection hijack Check shortcut properties, run TIA Portal.exe directly from Program Files Repair V15 install

Why does TIA Portal V15 say "Compilation failed. Please contact Siemens customer support" when compiling HMI VB scripts?

The error is a generic wrapper for HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). On V15 without service packs, it most commonly means the 64-bit COM class for the HMI VB script engine is mis-registered, often because a 32-bit TIA Portal V13 SP1 install overwrote overlapping GUIDs. Run Setup in silent repair mode (Setup.exe /repair /silent) to reinstate the registration.

The Setup wizard shows only the splash screen and exits. How do I repair TIA V15 if the repair tool itself will not start?

The Setup bootstrapper is the very component that depends on the broken registration. Run the bootstrapper in silent mode from an elevated command prompt with verbose logging, e.g. "Setup.exe" /repair /silent /log"C:\logs\tia.log". If silent mode also fails, uninstall V13 SP1 first (reboot), then uninstall V15, delete the residual Siemens folders, and reinstall V15 from clean media.

Can TIA Portal V13 SP1 and V15 coexist on the same workstation?

Only if V13 SP1 is installed first and V15 is installed second. V13 SP1 is 32-bit and V15 is 64-bit, so they must not share registry entries. If you already installed them in the wrong order, uninstall both and reinstall in the correct order. For long-term multi-version work, use one VM per major TIA Portal version.

After repairing V15, the HMI compile still fails only on one project. What should I check?

Inspect the script references under HMI Scripts > References in that project. A missing or invalid reference produces the same "Compilation failed" message. Also verify the project locale under Project > Properties > Locale is set consistently, and confirm the target runtime supports the APIs used in the script.

Which TIA Portal V15 update fixes the silent Setup exit and HMI VB compile issues?

Update 3 (V15.0.3) and especially Update 4 / V15.1 contain the cumulative HMI VB compiler fixes and the rewritten setup bootstrapper that bypasses the COM dependency that triggers the silent exit. Migrate to V15.1 or later whenever the project allows; V15 without any service pack is no longer supported by Siemens.

Back to blog