Resolving WinCC Flexible Transfer VB Runtime Error on XP SP2

David Krause15 min read
SiemensTroubleshootingWinCC
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 WinCC Flexible 2005 SP1 on a Windows XP Professional SP2 development workstation frequently encounter a Microsoft Visual Basic runtime error when invoking the Transfer command from inside the integrated Engineering System (ES). The same Transfer dialog opens correctly when launched from a standalone desktop shortcut to transfer.exe / HmiLoad.exe, or from the Siemens SIMATIC Start menu. The fault is therefore isolated to the in-process COM launch path used by the WinCC Flexible menu, not to the transfer engine itself.

The most common underlying causes observed in field installations are:

  • Environment / path length saturation caused by co-installed software (RSLogix, ProTool Pro remnants, multiple Siemens packages) that pushes the cumulative PATH string toward the 2,047-character Windows XP limit, or the cumulative Transfer process path toward the 260-character MAX_PATH ceiling.
  • Stale ProTool Pro COM registrations left behind by a partial ProTool-to-WinCC Flexible upgrade. ProTool Pro is registered as an in-process COM server; unintegrating the project shell does not unregister every CLSID.
  • Third-party DLL conflicts. Remote-access or HMI tools such as PC-Anywhere, VNC Enterprise Edition, or RSLinx are known to overwrite MSVBVM60.DLL, comct332.ocx, MSCOMCTL.OCX, comdlg32.ocx, and scrrun.dll with versions that the Transfer launcher cannot use.
  • Install-order violation. Installing non-Siemens software after WinCC Flexible silently downgrades Visual Basic 6 runtime libraries the Transfer dialog depends on.
The shortcut workaround is functionally complete - the engineer can still transfer the project. The fault does not corrupt compiled runtime files, project archives, or the HMI panel image. The fix is environmental, not project-related.

Affected Software Stack

Component Confirmed Version Notes
Operating system Windows XP Professional SP2 SP2 has known COM hardening changes that affect older launchers; SP3 has the same behavior.
STEP 7 V5.4 + SP Integrated via SIMATIC Manager; the in-process "Check installed software" function fails with the same VB error.
IMAP V3 Intelligent Multi-Panel Automation Platform add-in. Independent of the Transfer launcher.
WinCC Flexible 2005 SP1 + Update ES (Engineering System) component. See the WinCC Flexible 2005 SP1 Update release notes.
Legacy software ProTool Pro V6.x Must be fully unintegrated and unregistered before WinCC Flexible 2005 SP1 is installed.
HMI target SIMATIC MP 370 Multi Panel 12" or 15" TFT, Windows CE HMI runtime. See the MP 370 operating instructions.
Third-party stack RSLogix 500/5000, RSLinx, PC-Anywhere Path length contributors, DLL overwriters. See the Siemens FAQ on coexisting Siemens and third-party HMI software.

Symptoms and Observed Behavior

The engineer typically reports the following pattern:

  1. Clicking Transfer > Transfer (or the Transfer toolbar button) inside the WinCC Flexible ES produces a dialog box titled Microsoft Visual Basic with one of these runtime errors:
    • Run-time error '429': ActiveX component can't create object
    • Run-time error '440': Automation error
    • Run-time error '438': Object doesn't support this property or method
    • Run-time error '70': Permission denied
    • Run-time error '7': Out of memory
  2. The dialog offers only Continue and End; pressing End terminates the call but leaves WinCC Flexible running.
  3. The same operation invoked from Start > SIMATIC > WinCC Flexible > Transfer works correctly.
  4. Checking installed software from inside SIMATIC Manager produces the same VB runtime error; the standalone S7-Component-Manager.exe from the Start menu works.
  5. Project compile, simulation, and download (once a transfer session is opened by any other means) all function normally.

This pattern is diagnostic: the problem is in the COM launch layer used by the in-process dialog host, not in the transfer engine. See the Microsoft Visual Basic 6 runtime error reference at Microsoft VB6 runtime error codes for the canonical interpretation of each error code.

Root Cause Analysis

Cause 1 - Environment / Path Length Saturation

Windows XP enforces a hard limit of 2,047 characters on the combined PATH and PATHEXT environment variables, and a separate MAX_PATH of 260 characters for individual file paths passed to Win32 API calls. The WinCC Flexible Transfer launcher is built on a Visual Basic 6 shell that walks the registry to enumerate HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\Automation\InstalledSoftware at launch. If the cumulative path (Siemens install root + project path + temporary unpack directory) exceeds these limits, the COM instantiation fails before the Transfer dialog is built.

Path audit from a command prompt:

echo %PATH% > %TEMP%\path_audit.txt
echo %PATHEXT% >> %TEMP%\path_audit.txt
notepad %TEMP%\path_audit.txt

A combined length greater than 1,800 characters is a strong indicator. Common offenders in a multi-vendor HMI shop:

  • C:\Program Files\Rockwell Software\RSLogix 5000\bin
  • C:\Program Files\Rockwell Software\RSView
  • C:\Program Files\Symantec\pcAnywhere
  • C:\Program Files\Common Files\Siemens\Automation\
  • C:\Program Files\Siemens\Automation\WinCC Flexible\
  • C:\Program Files\Siemens\Automation\S7-PCT\

Practical reduction: move the WinCC Flexible project root to a short root such as C:\Flex\Projects\<projname> instead of the deep default C:\Documents and Settings\<user>\My Documents\Siemens Automation\Projects\WinCC Flexible\<projname>.

Cause 2 - Stale ProTool Pro COM Registration

ProTool Pro registers its project shell as an in-process COM server using HKEY_CLASSES_ROOT\CLSID\{...}\InProcServer32 entries that point to its own runtime DLLs. When ProTool Pro is unintegrated from STEP 7, only the SIMATIC Manager integration is removed. The COM CLSIDs and the HKCR\ProtPro.Project* entries remain. The WinCC Flexible Transfer dialog shell enumerates these CLSIDs (because it inherits parts of the SIMATIC integration code), and the broken ProTool handler raises a VB runtime error.

Inspect the registry:

regedit /e %TEMP%\ptp_com.reg "HKEY_CLASSES_ROOT\ProtPro"

Open the exported file and look for references to C:\Program Files\Siemens\Automation\ProTool\ or C:\SIEMENS\PROTOOL\. Each CLSID that points to a missing DLL is a candidate cause of the VB error.

Cause 3 - DLL Conflict from Third-Party Remote or HMI Tools

Tools such as PC-Anywhere, VNC Enterprise Edition, LapLink, and certain Rockwell RSLinx releases are known to install or replace shared system components that the WinCC Flexible Transfer launcher depends on:

Component File Effect on Transfer
VB6 runtime engine MSVBVM60.DLL Downgrade breaks COM launches (error 429).
Common Controls 2 comct332.ocx Tree-view rendering faults in dialog.
Microsoft Common Controls MSCOMCTL.OCX Listview fault (error 438).
Common Dialogs comdlg32.ocx File picker fault (error 440).
Windows Script Host Runtime scrrun.dll Automation error 440.
COM marshaling asycfilt.dll Automation error 429.

If any of these was downgraded by a non-Siemens installer that ran after WinCC Flexible, the in-process Transfer launcher will fail. The standalone shortcut works because the desktop shortcut's process can locate the replacement DLLs in System32, while the COM-launched in-process path enforces the version with which the launcher was originally registered.

Quick conflict check:

where comct332.ocx
where MSVBVM60.DLL
where scrrun.dll
dir /s /b "%SystemRoot%\System32" | findstr /i "MSVBVM comctl"

If more than one version is present (e.g., a copy in C:\Program Files\Siemens\Automation\ and a copy in C:\Windows\System32\), the loader may pick the wrong one depending on the launch context.

Cause 4 - Install Order Violation

The standard Siemens install order for a co-located STEP 7 + WinCC Flexible + IMAP workstation is:

  1. Windows XP Professional SP2 (clean)
  2. STEP 7 V5.4
  3. WinCC Flexible 2005 SP1 + Update
  4. IMAP V3
  5. HMI device plug-ins

If ProTool Pro, PC-Anywhere, or RSLinx is installed after step 3, the new installer may overwrite Visual Basic runtime files in C:\Windows\System32\ with versions that the Transfer shell does not match. The shell verifies the file version of MSVBVM60.DLL at launch; an unexpected version triggers VB runtime error 429. See the Siemens FAQ on coexisting Siemens and third-party HMI software for the official guidance.

Diagnostic Procedure

Run the following steps in order to confirm the root cause. Document each result in the project HMI commissioning log.

  1. Capture the exact error text. Do not dismiss the dialog. The exact Run-time error 'NNN': <text> line is the only reliable way to narrow the cause.
  2. Test the shortcut workaround. Create a desktop shortcut to C:\Program Files\Siemens\Automation\WinCC Flexible\HmiLoad.exe (newer utility) or ...\Transfer.exe (legacy). If the shortcut works, the Transfer engine is intact; the problem is the in-process COM launch.
  3. Test from the SIMATIC Start menu. Click Start > SIMATIC > WinCC Flexible > Transfer. If this works, the executable is fine.
  4. Audit the PATH length. Use the command shown in Cause 1. Anything above 1,800 characters should be reduced.
  5. Search for stale ProTool Pro CLSIDs. reg query "HKCR\CLSID" /f "ProTool" /s > %TEMP%\ptp_clsid.txt Open the file. If any entry points to a non-existent DLL, the COM enumeration will fail.
  6. Check the VB6 runtime file version. Right-click C:\Windows\System32\MSVBVM60.DLL, choose Properties > Version. The version stamp should match the version delivered by the WinCC Flexible 2005 SP1 install media. Compare with a reference installation or with the file on the install CD under Setup\Support\.
  7. Enable Process Monitor trace. Download and run procmon.exe from Sysinternals. Filter on Path contains transfer.exe. Click the failing menu item. Examine the last successful file open and the first failing call - typically a CreateFile returning NAME TOO LONG or PATH NOT FOUND on a path containing the deep Siemens tree.
  8. Run sfc /scannow from an elevated command prompt to verify that protected system files match the SP2 baseline.
  9. Re-register the COM components (corrective, not diagnostic):
    for %f in (comct332.ocx MSCOMCTL.OCX comdlg32.ocx scrrun.dll) do regsvr32 /s /u %f
    regsvr32 /s comct332.ocx
    regsvr32 /s MSCOMCTL.OCX
    regsvr32 /s comdlg32.ocx
    regsvr32 /s scrrun.dll

Quick Workaround (No Reboot)

If the project is mid-commissioning and the engineer cannot afford a re-install, the in-process launch fault can be bypassed without code changes.

  1. Pin a shortcut to HmiLoad.exe to the taskbar and to Start > Programs > Startup.
  2. From HmiLoad.exe, the engineer can browse the HMI target, set the connection (MPI / PROFIBUS / TCP), and perform the transfer directly, without going through the WinCC Flexible integrated menu.
  3. Document the workaround in the project HMI commissioning log so that any follow-up engineer can continue without the integrated launch.

The shortcut works because HmiLoad.exe (or Transfer.exe) is a standalone Win32 process. It does not rely on the broken COM in-process launch context used by the menu. HmiLoad.exe is the supported transfer tool starting with WinCC Flexible 2005 SP1 and is less sensitive to COM registration state than Transfer.exe.

Property Transfer.exe HmiLoad.exe
Era Legacy (ProTool Pro & WinCC Flexible pre-2005) WinCC Flexible 2005 SP1+
Process model Standalone Win32 Standalone Win32
COM dependency Medium Low
Supported targets OP / TP / MP / Panel PC OP / TP / MP / Panel PC / WinCC Flexible Runtime
Boot project support Yes Yes (preferred tool)

Permanent Resolution

The permanent fix requires seven steps in sequence. Allow 90-180 minutes of downtime.

Step 1 - Capture project archives

xcopy "C:\Program Files\Siemens\Automation\Projects\WinCC Flexible\*" "D:\Backup\FlexProjects\*" /E /H /I
reg export "HKLM\SOFTWARE\Siemens" "D:\Backup\siemens_hklm.reg" /y
reg export "HKCU\SOFTWARE\Siemens" "D:\Backup\siemens_hkcu.reg" /y

Step 2 - Decouple ProTool Pro

  1. Open STEP 7 SIMATIC Manager and choose Options > SIMATIC Integration. Unintegrate ProTool Pro if it still appears.
  2. Open Control Panel > Add or Remove Programs and uninstall SIMATIC ProTool/Pro V6.x.
  3. Clean the registry of remaining ProTool CLSIDs:
    reg delete "HKCR\ProtPro.Project" /f
    reg delete "HKCR\ProtPro.Workspace" /f
    reg delete "HKCR\ProtPro.HmiPro" /f
    reg delete "HKLM\SOFTWARE\Siemens\Automation\ProTool" /f
  4. Delete the install directory:
    rmdir /s /q "C:\Program Files\Siemens\Automation\ProTool"
    rmdir /s /q "C:\Siemens\ProTool"

Step 3 - Repair the Visual Basic 6 runtime

Reinstall the VB6 runtime from the WinCC Flexible 2005 SP1 install media. The relevant files are normally under CD\Setup\WinCC_Flexible\InstData\... or in a self-extracting archive. Re-register the components:

cd /d "%SystemRoot%\System32"
regsvr32 /u /s MSVBVM60.DLL
copy /y "D:\InstallMedia\Siemens\WinCC_Flexible_2005_SP1\Support\MSVBVM60.DLL" .
regsvr32 /s MSVBVM60.DLL
regsvr32 /s comct332.ocx
regsvr32 /s MSCOMCTL.OCX
regsvr32 /s comdlg32.ocx
regsvr32 /s scrrun.dll

If a copy of MSVBVM60.DLL exists in a Siemens subdirectory and is newer than the one in System32, copy the Siemens version into System32 so that the loader resolves it consistently. Verify with sigverif against the Windows XP SP2 trusted signature list.

Step 4 - Reduce path length

Move the project root from the deep default to a short root:

  • Old: C:\Documents and Settings\<user>\My Documents\Siemens Automation\Projects\WinCC Flexible\<projname>\
  • New: C:\Flex\<projname>\

Trim redundant entries from the system PATH:

setx PATH "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Siemens\Automation\Common"

Keep only the entries required by WinCC Flexible, STEP 7, IMAP, and the Windows shell. Verify the new length is below 1,000 characters. Restart the shell and re-test.

Step 5 - Repair the WinCC Flexible installation

  1. Open Control Panel > Add or Remove Programs.
  2. Select SIMATIC WinCC Flexible 2005 SP1.
  3. Choose Change > Repair.
  4. When prompted, allow the installer to re-register the COM components.

Alternatively, run from the install media:

D:\Setup\Setup.exe /repair

Step 6 - Apply the WinCC Flexible 2005 SP1 Update

If not already applied, install the SP1 Update package that supersedes the original SP1 build. The update includes a fix for an in-process COM enumeration fault under long paths and replaces the Transfer launcher with a version that is tolerant of missing ProTool CLSIDs. See the WinCC Flexible 2005 SP1 Update release notes for the full list of changes.

Step 7 - Rebuild on a clean drive (recommended for production)

For a production engineering workstation that hosts long-lived projects, the most reliable fix is a clean rebuild:

  1. Disconnect the workstation and clone the existing disk to a spare.
  2. Wipe the system drive and reinstall Windows XP Professional SP2 from verified media.
  3. Install only the Siemens stack in the documented order (STEP 7, WinCC Flexible, IMAP, plug-ins).
  4. If non-Siemens software (RSLinx, PC-Anywhere) is required, place it on a secondary image that is used only for the non-Siemens toolchain.

Verification

After applying the permanent fix, run the following checks in order. All nine must pass.

# Check Pass criterion
1 Launch WinCC Flexible 2005 SP1 ES Opens within 8 s, no VB error
2 Click Transfer > Transfer in the menu Transfer dialog opens, no VB error
3 Click Transfer > Transfer Settings Settings dialog opens, MPI / PROFIBUS / TCP connection visible
4 Browse target on the MP 370 Device discovered, IP / MPI address visible
5 Compile the project 0 errors, 0 warnings expected; warnings accepted if pre-existing
6 Start Transfer to MP 370 Image transfer reaches 100% and panel reboots into runtime
7 Restart WinCC Flexible ES Transfer menu still works (no registration regression)
8 Reboot the workstation After reboot, the same checks pass without re-registration
9 Run procmon for 30 s with a Transfer click No NAME TOO LONG or PATH NOT FOUND for the Transfer process tree

Best Practices and Prevention

  • Clean install order. Always install Siemens software first, on a clean image. Treat any deviation as a documented exception with its own backup.
  • Path length discipline. Keep the project root under three directory levels and use no blanks (spaces) in folder names. WinCC Flexible 2005 has known issues with project paths that contain spaces, and WinCC Flexible 2008/2010 inherit the same limitation.
  • Naming conventions. Project name should be [A-Za-z0-9_]{1,32} with no spaces and no special characters. Subfolder hierarchy should be no deeper than five levels below the project root.
  • Use HmiLoad.exe over Transfer.exe when a manual transfer is needed outside the integrated ES context. HmiLoad.exe is the supported transfer tool starting with WinCC Flexible 2005 SP1 and is less sensitive to COM registration state.
  • Never co-install ProTool Pro and WinCC Flexible on a production ES. Migration is performed by exporting the ProTool project and importing it into a new WinCC Flexible project - not by side-by-side install.
  • Snapshot the system before installing any third-party remote-access or HMI tool. Tools that touch system DLLs (PC-Anywhere, VNC, RSLinx, VMware) can silently break the Transfer launch.
  • Document the install order and the environment PATH in the project HMI engineering log. Future engineers must be able to reconstruct the workstation.
  • Avoid nested Virtual Machine paths. If the ES runs inside a VM whose host uses a long path, the cumulative path inside the guest can saturate. Use a short shared folder name and a deep but local project root.

Troubleshooting Matrix

Observed error Most likely cause First action
Run-time error '429' Stale ProTool Pro CLSID or downgraded MSVBVM60.DLL Unregister ProTool CLSIDs; repair VB6 runtime
Run-time error '440' Automation call to a non-existent ProTool COM object Same as 429; re-register the OCX/DLL stack
Run-time error '438' Common Controls OCX downgraded by RSLinx / VNC Re-register comct332.ocx and MSCOMCTL.OCX
Run-time error '70' Project on a read-only or network share Copy project to local disk, retry
Run-time error '7' Out of memory; or PATH saturation above 2,047 chars Trim PATH, reduce project depth
Shortcut works, menu fails COM in-process launch context Apply permanent resolution steps 1-6
Both fail WinCC Flexible installation corrupted Repair install (step 5) or rebuild (step 7)
Procmon shows NAME TOO LONG Path length above 260 chars in a CreateFile call Move project to short root (step 4)
Procmon shows PATH NOT FOUND for ptpshell.dll Stale ProTool Pro COM registration Decouple ProTool Pro (step 2)

Process Monitor Trace Pattern

A reproducible trace from procmon.exe for a failing Transfer click shows the following sequence under the Transfer.exe process tree:

1. QueryOpen   HKLM\SOFTWARE\Siemens\Automation\InstalledSoftware      SUCCESS
2. RegQueryValue HKLM\SOFTWARE\Siemens\Automation\InstalledSoftware\ProTool NAME NOT FOUND
3. CreateFile  C:\Program Files\Siemens\Automation\ProTool\bin\ptpshell.dll PATH NOT FOUND
4. CreateFile  C:\Program Files\Siemens\Automation\ProTool\bin\ptpshell.dll NAME TOO LONG
5. VB runtime error '429': ActiveX component can't create object

The first failure is the missing ptpshell.dll from ProTool. The second is the cumulative path length when the launcher tries a fallback. Either of these is sufficient to surface the VB runtime error. The shortcut works because the launch context used by HmiLoad.exe does not enumerate the ProTool CLSID.

FAQ

Why does the desktop shortcut work but the in-process menu does not?

The desktop shortcut launches HmiLoad.exe or transfer.exe as a standalone Win32 process. The in-process menu launches the same engine through a COM in-process server that enumerates the Siemens CLSID tree, including stale ProTool entries. The standalone path skips the COM enumeration, so the fault is not exercised.

Which VB runtime error is most commonly seen?

Error 429 "ActiveX component can't create object" is the most common. Error 440 "Automation error" follows when the COM object is found but fails to instantiate. Error 70 "Permission denied" is seen when the launch path is on a read-only or network share with no execute permission.

Is it safe to delete the ProTool CLSIDs from the registry?

Yes, provided that ProTool Pro is no longer installed and no other application depends on those CLSIDs. Export the registry branch to a backup file first using reg export, and verify with reg query that no other software references the keys before deletion.

Does moving the project to a short path always fix the issue?

No. A short project path eliminates the path-length class of errors but does not repair stale ProTool CLSIDs or overwritten VB6 runtime DLLs. The fix is multi-step: short path + ProTool cleanup + VB6 runtime repair + WinCC Flexible repair install.

Will upgrading to WinCC Flexible 2008 or TIA Portal fix this?

Upgrading to WinCC Flexible 2008 SP2 or TIA Portal V13+ resolves the issue because the new transfer stack does not depend on the legacy ProTool COM enumeration. However, the upgrade path requires a project migration and is not always practical mid-project. For an active MP 370 deployment, the repair path described in this article is the lower-risk option.

Back to blog