Resolving WinCC Runtime Advanced Error 429: ActiveX Component Can't Create Object on SIMATIC IPC
Runtime error 429 ("ActiveX component can't create object") is the most common COM instantiation failure encountered when porting WinCC Flexible or WinCE panel scripts into WinCC Runtime Advanced on a Windows-based SIMATIC IPC (IPC377, IPC227, IPC427, IPC477, IPC647, IPC847, or similar). The error fires the moment the VBScript engine calls CreateObject("FileCtl.FileSystem") against a runtime that does not host the legacy FileCtl ActiveX server. Because the call site is inside an alarm or scheduled action that runs unattended on the HMI device, the script aborts, the alarm is never raised, and the operator sees a silent process gap. This article walks through the root cause, the correct object model for a PC-based runtime, the exact replacement call, diagnostic logging via HMIRuntime.Trace, and the verification steps that confirm a permanent fix on WinCC Advanced V15.1 and later Update releases.
FileCtl remains valid.1. Problem Description
A VBScript scheduled in a WinCC Advanced HMI screen, a tag-triggered action, or an alarm-triggered action raises the following error the first time a file I/O routine is invoked:
Runtime error '429'
ActiveX component can't create object.
Source: Microsoft VBScript runtime error
Line: <line referencing CreateObject>
Typical call site (taken from a working script that was migrated from a WinCC Flexible / WinCE panel to a WinCC Runtime Advanced IPC):
' --- legacy WinCE / WinCC Flexible syntax ---
Dim oFS
Set oFS = CreateObject("FileCtl.FileSystem") ' <-- raises error 429 on IPC
Dim sPath, sFile
sPath = "\Storage Card\Logs\"
sFile = sPath & "alarm_" & Year(Now) & "_" & Month(Now) & ".log"
Dim iFile
iFile = oFS.OpenTextFile(sFile, 8, True, -1) ' 8 = ForAppending, True = create, -1 = ASCII
iFile.WriteLine Now & ";" & Err.Number & ";" & Err.Description
iFile.Close
Set oFS = Nothing
The error fires on the CreateObject line because the WinCC Runtime Advanced process (CCEServer / HMIRuntime) does not expose the FileCtl.FileSystem COM class on a Windows desktop runtime. The function returns the standard VBScript error object, which is then passed unmodified into the ShowSystemAlarm call:
ShowSystemAlarm "MTR1 - Error # " & CStr(Err.Number) & " " & Err.Description
Result: the alarm text becomes "MTR1 - Error # 429 ActiveX component can't create object", the log file is never written, and subsequent scheduled actions keep failing until the runtime is restarted.
2. Affected Software and Hardware
| Component | Versions / Models Known to Exhibit the Fault |
|---|---|
| Engineering system | TIA Portal V15.1, V16, V17, V18 with WinCC Advanced / WinCC Comfort configured |
| Runtime target | WinCC Runtime Advanced V15.1, V15.1 Update 1..6, V16, V17, V18 |
| Operating system | Windows 10 IoT Enterprise LTSC 2019 (1809), LTSC 2021 (21H2); Windows Server 2019; Windows 7 Embedded SP1 (legacy) |
| Panel PCs | SIMATIC IPC277G, IPC377G, IPC427G/D, IPC477G, IPC547G, IPC647C, IPC847C, IPC1047 (all x86/x64 Windows variants) |
| Software PC runtime | WinCC Runtime Advanced installed on an industrial PC, SoftPLC host, or engineering PC |
| NOT affected | Comfort Panels TP700..TP2200, Unified Comfort Panels, Mobile Panels 2nd gen — all use WEC2013 / Linux; the FileCtl object IS valid there. |
Whenever a script was authored against the WinCC Flexible / WinCC Comfort on a CE device object model and then deployed to a WinCC Runtime Advanced on Windows target, the legacy calls must be rewritten. The Siemens support entry FAQ 59604194 lists the VBScript functions and objects that differ between the two runtimes.
3. Root Cause Analysis
FileCtl.FileSystem is an ActiveX control shipped with the WinCE build of WinCC Flexible and WinCC Comfort. It implements a slimmed-down file I/O API (open / read / write / close, no streams, no Unicode) suitable for the constrained CE kernel. WinCC Runtime Advanced for Windows is a 32-bit or 64-bit process running on the full Win32 / Win64 subsystem and is built on top of the standard Microsoft VBScript 5.8 engine. It does not host FileCtl.dll; the COM class is not registered in the Windows registry, so the COM Service Control Manager returns the CLASS_E_CLASSNOTREG (0x80040154) error, which VBScript surfaces as runtime error 429.
The Microsoft VBScript host translates every COM instantiation failure (registry missing, DCOM access denied, 32/64-bit apartment mismatch, sandboxed user) into the same 429 number. A 429 therefore always means "the COM server for the requested ProgID is unavailable", never "the object does not exist". The actual HRESULT returned by the runtime is recorded in Err.LastDllError in some hosts, but in WinCC scripts the only data exposed to the alarm is the decimal 429.
Scripting.FileSystemObject works on IPC. The Microsoft Scripting Runtime (scrrun.dll) is part of every supported Windows distribution. It is registered under the ProgID Scripting.FileSystemObject and the CLSID {0D43FE01-F093-11CF-8940-00A0C9054228}. The WinCC Runtime Advanced installer explicitly registers the scripting host and does not block scrrun.dll, so the standard FSO model is the supported replacement.Other ProgIDs that share the same 429 failure on a Windows WinCC runtime include:
-
FileCtl.File(a wrapper for file copy / rename on WinCE) -
WinCCRuntimeAdvanced.FileCtl(does not exist; frequent author typo) -
Siemens.Simatic.Hmi.UAClientCOMon TIA V13 SP1 where the OPC UA COM proxy has not been registered
The general troubleshooting approach is identical: check that the COM server DLL is present and registered for the bitness of the HMIRuntime process (always 32-bit on WinCC Runtime Advanced V15.1, 64-bit on V17+ when the project target is x64).
4. Step-by-Step Diagnostic Procedure
Run the following checks on the IPC to isolate where the COM lookup fails. They assume remote desktop or KVM access to the device.
-
Confirm the runtime is x86 or x64. Open Task Manager, locate
CCEServer.exe(the WinCC Runtime Advanced process) and check the Platform column. On V15.1 and V16 the process is always 32-bit; on V17+ the platform follows the TIA project target. -
Search the registry for the requested ProgID. Run
regeditand navigate toHKCR\FileCtl.FileSystem. If the key does not exist, the COM class is not registered. The pathHKCR\CLSID\{0D43FE01-F093-11CF-8940-00A0C9054228}must exist forScripting.FileSystemObject. -
Check the bitness of the registered COM server. Inspect the
InprocServer32subkey; the default value must point to a DLL that matches the bitness ofCCEServer.exe. A 64-bitscrrun.dllcannot be loaded by a 32-bit script engine and yields 429. -
Test instantiation from a standalone VBScript. Create
C:\Temp\fso_test.vbswith the single lineCreateObject("Scripting.FileSystemObject"), then runcscript.exe //NoLogo C:\Temp\fso_test.vbsunder the same Windows user that runs the runtime service. If this succeeds and the WinCC script still fails, the runtime user lacks the launch permission for the COM object. -
Inspect the runtime user. WinCC Runtime Advanced runs under the local system account by default when started as a service, or under the interactive user when launched from
Start > Programs > Siemens Automation. The DCOM launch permission must include the runtime user. See the Microsoft support article "You receive run-time error 429 when you automate Office applications" for a generic methodology, which also applies to other COM servers. -
Capture the alarm text. Temporarily add a trace line before the
CreateObjectcall to confirm the error fires on the expected line. See Section 6 for the recommendedHMIRuntime.Tracepattern.
Siemens publishes a consolidated script-diagnostics FAQ at entry 106501825, and a WinCC V15.1 / V16 / V17 script-FAQ collection at entry 13408815. Both confirm the same remediation: replace the WinCE-specific object with the Windows equivalent.
5. Solution: Replace FileCtl with Scripting.FileSystemObject
The canonical Windows replacement is the Microsoft Scripting Runtime FileSystemObject (FSSO). The class exposes the same operations used by the original script (open, append, write line, close) with a slightly different calling convention.
' --- corrected WinCC Runtime Advanced script ---
Option Explicit
Const ForAppending = 8
Const TristateUseDefault = -2 ' Unicode on NTFS
Dim oFS, oFile, sPath, sFile
Set oFS = CreateObject("Scripting.FileSystemObject")
sPath = "C:\ProgramData\Siemens\Automation\Logs\"
If Not oFS.FolderExists(sPath) Then oFS.CreateFolder sPath
sFile = sPath & "alarm_" & _
Right("0000" & Year(Now), 4) & "_" & _
Right("00" & Month(Now), 2) & ".log"
Set oFile = oFS.OpenTextFile(sFile, ForAppending, True, TristateUseDefault)
oFile.WriteLine FormatDateTime(Now, vbGeneralDate) & ";" & _
CStr(Err.Number) & ";" & _
Replace(Err.Description, vbCrLf, " ")
oFile.Close
Set oFile = Nothing
Set oFS = Nothing
Key differences versus the WinCE version:
-
Path root. WinCE panels mount removable media under
\Storage Card\. WinCC Runtime Advanced on Windows uses ordinary NTFS paths, e.g.C:\ProgramData\Siemens\Automation\Logs\or any folder underD:\Logs\if the IPC has a separate data partition. Avoid the system drive rootC:\for write operations; it requires administrator rights when UAC is active and the runtime service is locked down by Windows. -
Folder creation. FSO will not create intermediate directories. Call
CreateFolderonce per level, or wrap the path in a recursive helper.FileCtlsilently created missing folders on WinCE; FSO does not. -
Unicode mode. Pass
TristateUseDefault (-2)toOpenTextFileso that the file is written as UTF-16 on NTFS, matching the rest of the WinCC logging. PassingTristateFalse (0)forces ASCII and mangles non-Latin tag names. -
Append flag. The third parameter of
OpenTextFileis create-if-missing, not append. Append behaviour is the second parameter (ForAppending = 8). The original WinCE snippet conflated the two arguments. -
Error handling. Wrap the whole routine in
On Error Resume Nextonly if the upstream logic must continue regardless; otherwise rely on VBScript's default behaviour and inspectErr.Numberafterwards. Always resetErrwithErr.Clearat the end.
6. Adding Diagnostic Tracing with HMIRuntime.Trace
WinCC Runtime Advanced exposes a dedicated trace API for VBScript. It writes the message to the PDLRT ring buffer and, if configured, to a *.log file under C:\ProgramData\Siemens\Automation\Logs\WinCC_RT_<date>.log. HMIRuntime.Trace is supported on every Windows runtime target and is the recommended replacement for the abort-causing ShowSystemAlarm debug pattern.
Sub LogAlarm(sTag As String, sText As String)
On Error Resume Next
HMIRuntime.Trace "[" & sTag & "] " & _
FormatDateTime(Now, vbGeneralDate) & " " & sText
If Err.Number <> 0 Then
' FSO failed as well; fall back to a system event log entry
Dim oShell : Set oShell = CreateObject("WScript.Shell")
oShell.LogEvent 1, "WinCC_RT trace fallback: " & sText
Set oShell = Nothing
End If
On Error Goto 0
End Sub
' --- call from the alarm action ---
LogAlarm "MTR1", "Error # " & CStr(Err.Number) & " " & Err.Description
ShowSystemAlarm "MTR1 - Error # " & CStr(Err.Number) & " " & Err.Description
To enable the persistent trace file, open the WinCC Runtime Advanced project on the IPC, run SIMATIC WinCC Runtime Advanced > Tools > Settings > Trace, set the trace level to Information and tick Write to file. The path is C:\ProgramData\Siemens\Automation\Logs\ by default. The trace is also viewable with the WinCC Channel Diagnostics applet when the IPC is reachable over TCP/UDP port 4900 (Siemens default S7-RT port range).
7. Deployment and Verification
-
Edit the script in TIA Portal. Open the HMI project that contains the broken action (typically HMI Tags > Events > ChangeValue or Planned tasks). Replace the
FileCtlblock with the FSO block from Section 5. -
Recompile the runtime file. In the project tree select Compile > Software (rebuild all). The output
.fwxfile is regenerated. -
Transfer the project. Use Online > Download to device > WinCC Runtime Advanced with the correct target IP. If the IPC is offline, copy the compiled
.fwxtoC:\ProgramData\Siemens\Automation\WinCC RT Adv\<project>\and restart the runtime service. -
Restart the runtime. From the IPC, run Stop Runtime and Start Runtime, or reboot the IPC. The WinCC Runtime Advanced service is
CCEServer.exe; restarting clears any cached COM apartment state. -
Trigger the alarm manually. Force the tag value to exceed the configured limit and confirm that a new line is appended to
alarm_YYYY_MM.logand that the trace entry appears in the WinCC RT log file. -
Negative test. Temporarily revert one line back to
CreateObject("FileCtl.FileSystem")and confirm that 429 still fires — this proves that the new code path is responsible for the fix and that no stale cached object hides the regression.
8. Troubleshooting Matrix
| Symptom | Root Cause | Fix |
|---|---|---|
Error 429 on CreateObject("FileCtl.FileSystem")
|
FileCtl ActiveX is WinCE-only | Replace with Scripting.FileSystemObject
|
Error 429 on CreateObject("Scripting.FileSystemObject")
|
scrrun.dll blocked by AppLocker / SRP / DCOM policy |
Allow %SystemRoot%\System32\scrrun.dll in AppLocker; grant the runtime user DCOM launch permission |
| Error 429 only under the Windows service user, not the interactive user | DCOM launch / access permission missing for the service account | Open dcomcnfg > Component Services > Computers > My Computer > DCOM Config > scrrun, add the service user |
| Error 429 after TIA V15.1 Update 6 patch | Microsoft security update replaced scrrun.dll with a stricter version |
Register scrrun.dll with regsvr32 scrrun.dll; if disabled by group policy, add the IPC to the exception list |
| Error 429 only on x64 runtime (V17+) | 32-bit scrrun.dll not present in SysWOW64
|
Copy the 32-bit scrrun.dll from the engineering PC's SysWOW64 and run regsvr32 from that directory |
| Error 429 on a real Comfort Panel (TP1500) | Wrong project target — Comfort Panel runtime does not include FSO | Use FileCtl for file I/O on Comfort Panels, or use the Unified Comfort Panel's screen.items("IOField").text + FTP transfer for file logging |
Error 429 raised by OPC UA COM proxy Siemens.Simatic.Hmi.UAClientCOM
|
OPC UA COM wrapper not registered on the IPC | Reinstall WinCC Runtime Advanced with the OPC UA Server/Client option enabled, or run the redistributable that ships under Support\OPCUA\ on the TIA Portal installation media |
9. Best Practices for VBScript File I/O on WinCC Runtime Advanced
-
Target the runtime user, not the project author. Run a smoke-test VBScript under the same Windows user as the runtime service (default:
SYSTEMwhen started from the Start Center,Userwhen started from a console session). Different users have different DCOM and NTFS permissions; a script that works during commissioning can fail after an unattended reboot. -
Avoid the system drive. Write log files to
D:\Logs\,C:\ProgramData\Siemens\Automation\Logs\, or a USB-attached SSD. Writing toC:\on a UAC-locked IPC forces the runtime to elevate, which the WinCC service user cannot do. -
Cap file size. FSO can fill a partition if the log script runs faster than log rotation. Wrap
OpenTextFilewith a file-size check (oFile.Sizeafter opening in read mode) and roll the file at 50 MB or 30 days, whichever comes first. -
Time-stamp in UTC. Use
FormatDateTime(Now, vbGeneralDate)for local time, but pair it withFormatDateTime(ToUtcTime(Now), vbGeneralDate)if the logs are aggregated across time zones.ToUtcTimeis a Siemens VBS helper exposed by WinCC Runtime Advanced. -
Use
On Error Resume Nextsparingly. It silences every error, including the very 429 you are trying to debug. Enable it only around the call site, captureErr.Numberinto a local, and re-enable strict mode withOn Error Goto 0before returning to the caller. -
Prefer
HMIRuntime.Tracefor diagnostics. The trace API is host-aware: messages from a script that aborts mid-routine are still flushed to the ring buffer. The 5-message ring buffer survives a script crash; the system alarm does not.
10. Reference: COM ProgIDs and Their Status on WinCC Runtime Advanced V15.1
| ProgID | WinCE / Comfort Panel | WinCC Runtime Advanced on Windows | Replacement |
|---|---|---|---|
FileCtl.FileSystem |
Available | Not available (causes error 429) | Scripting.FileSystemObject |
FileCtl.File |
Available | Not available |
Scripting.FileSystemObject + File.CopyFile
|
Scripting.FileSystemObject |
Not available | Available | — |
WScript.Shell |
Not available | Available | — |
WinCCRuntimeAdvanced.Alarm |
Not available | Available | — |
HMIRuntime.Trace (function, not COM) |
Available | Available | — |
Siemens.Simatic.Hmi.UAClientCOM |
Not available | Optional install component | — |
11. Cross-Reference to Siemens Knowledge Base
- Siemens Support Entry 13408815 — Scripting FAQs in WinCC Runtime Advanced
- Siemens Support Entry 59604194 — VBScript object model differences Comfort vs. Runtime Advanced
- Siemens Support Entry 106501825 — Diagnostic steps for VBScript failures in WinCC Runtime Advanced
- Microsoft Support — Run-time error 429 when automating Office applications (general methodology for COM launch permission issues)
After applying the Scripting.FileSystemObject replacement and confirming the new log file is written, the WinCC Runtime Advanced IPC will no longer raise runtime error 429 on file I/O. Repeat the fix in every scheduled task and alarm action that referenced FileCtl; a project-wide search for FileCtl in the TIA Portal scripts folder (right-click project > Search in project) ensures no migrated code path is left behind.
Frequently Asked Questions
Why does my WinCC Runtime Advanced script fail with error 429 on a SIMATIC IPC when the same script worked on a Comfort Panel?
Because the Comfort Panel runs Windows CE / WEC and ships the FileCtl ActiveX control. The IPC runs a full Windows OS, where FileCtl is not registered. Replace CreateObject("FileCtl.FileSystem") with CreateObject("Scripting.FileSystemObject") and switch paths from \Storage Card\ to a Windows folder such as C:\ProgramData\Siemens\Automation\Logs\.
What HRESULT does the VBScript host hide behind runtime error 429?
Error 429 is the decimal translation of CLASS_E_CLASSNOTREG (0x80040154) in most cases, but it also covers E_ACCESSDENIED (0x80070005), CO_E_SERVER_EXEC_FAILURE (0x80080005), and apartment mismatches. Use the diagnostic steps in Section 4 to identify the actual sub-cause.
Is Scripting.FileSystemObject supported on x64 WinCC Runtime Advanced V17 projects?
Yes. The 64-bit scrrun.dll in %SystemRoot%\System32\ and the 32-bit copy in %SystemRoot%\SysWOW64\ are both registered automatically. Make sure the HMIRuntime process bitness matches the DLL bitness and that the runtime user has DCOM launch permission for the scripting host.
How do I write a UTF-8 log file with FSO from inside WinCC Runtime Advanced?
FSO does not support UTF-8 directly. Use TristateUseDefault (-2) for UTF-16 LE, or write a UTF-8 BOM (EF BB BF) manually with oFile.Write followed by oFile.WriteLine. For pure UTF-8 streams, instantiate ADODB.Stream (CreateObject("ADODB.Stream")) with Charset = "UTF-8".
Can I keep the original WinCE path style \Storage Card\Logs\ on the IPC?
No. \Storage Card\ is a WinCE mount point and does not exist on Windows. Map the equivalent Windows folder, e.g. D:\Logs\ on the data partition, and confirm it is writable by the runtime service user before deploying the corrected project.