Resolving ComProfibus V5.1 Setup.ins Return Value -4 Install

David Krause10 min read
ProfibusSiemensTroubleshooting
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 maintaining legacy SIMATIC S5 PROFIBUS networks frequently encounter a fatal installer failure when deploying COM PROFIBUS V5.1 on modern Windows platforms. The installer aborts immediately after the target directory prompt and returns the diagnostic string:

DoInstall setup.ins failed Return value = -4

The fault is non-recoverable from the GUI; the Next button commits the transaction and the setup rolls back without writing a registry trace. The error originates in the InstallShield 5.x runtime that COM PROFIBUS V5.1 ships, and it is reproducible across Windows 2000, Windows XP SP2/SP3, and embedded PE environments when the target path, the host OS, or the prerequisite patch level violates the conditions the installer was compiled against.

This article documents the root cause, the prerequisite hotfix chain (HF1, HF2, HF3, SP2), the official Siemens support entry IDs, the install-time path constraints that trigger Return -4, and the field-proven workarounds for running the tool on Windows XP and later host operating systems that Siemens does not formally certify.

Affected Software, Part Numbers, and Catalog References

Item Identifier
Product COM PROFIBUS V5.1 (configuring tool for PROFIBUS DP / FMS)
MLFB / Order Number 6ES5 895-6SE03
Previous version COM PROFIBUS V5.0 (Windows 95/98, Windows NT 4.0)
Hotfix 1 (HF1) Siemens support entry, see Step 5
Hotfix 2 (HF2) Siemens support entry, see Step 5
Hotfix 3 (HF3) Siemens support entry, see Step 5
Service Pack 2 (SP2) Adds diagnostics repeater support; requires V5.1 or V5.1 + SP1 baseline
Lifecycle Discontinued; successor is STEP 7 Professional (TIA Portal) with HSP for S5 DP master

The product finder on the PROFIBUS & PROFINET International (PI) site lists COM PROFIBUS as the canonical configuring tool for PROFIBUS DP and FMS, used for addressing, configuring, and documenting DP segments. See the Configuring Tool for PROFIBUS DP/FMS product finder entry for the formal product description.

Root Cause Analysis of Return -4

The -4 return value is mapped by the InstallShield setup.ins script to a path-resolution failure during the DoInstall phase. Three independent root conditions can produce it:

  1. Target path length > 8 characters in the leaf directory. The installer preserves the 8.3 FAT convention in its path-validation macros. Targets such as C:\ComProf succeed, but C:\ComProfibus trips the validator and forces a rollback with -4. The same condition appears when the default directory prompt shows \ (root) because the validator failed to write a default.
  2. Path contains spaces, parentheses, or non-ASCII characters. Install paths containing Program Files, (x86), or accented characters fail the legacy 8.3 path check that COM PROFIBUS V5.1 performs on the temporary SETUP.ISS response file.
  3. Missing prerequisite patch level on Windows 2000. The InstallShield runtime that V5.1 ships expects Windows 2000 SP3 or SP4 (HF3 prerequisite). Installing on a non-patched Windows 2000 host produces the same -4 after the directory prompt because the helper DLL cannot resolve the system language module.

Siemens support entry 8460601 explicitly states that no PROFIBUS configuration software is offered for Windows XP, which is why installations on XP fail through the public release channel but succeed with documented workarounds (see Workaround section).

Prerequisites

Requirement Specification
Supported OS (officially) Windows 2000 with Service Pack 3 or Service Pack 4
Supported OS (unofficially) Windows XP SP2 / SP3 with workarounds; not officially supported by Siemens
Minimum RAM 128 MB (256 MB recommended for DP slave libraries)
Display 800 x 600, 256 colors
Free disk 150 MB plus 60 MB per project database
User account Local administrator (InstallShield requires write access to %WINDIR%\INF)
Parallel port (optional) Required only for IM 308C / CP 5431 download via the COM PROFIBUS online interface

Verify the host patch state before launching the installer:

  1. Open winver from Start → Run.
  2. Confirm Service Pack 3 or Service Pack 4 appears in the version string. If absent, apply SP4 from the Microsoft Windows 2000 Installation CD before continuing.

Standard Installation Procedure (Windows 2000 SP3/SP4)

  1. Insert the COM PROFIBUS V5.1 CD (6ES5 895-6SE03). The autorun starts Setup.exe from the CD root.
  2. When prompted for the target directory, replace the default \ with a path that respects the 8.3 rule, for example:
    C:\ComProf
    Do not use C:\ComProfibus, C:\Program Files\ComProf, or any path containing a space.
  3. Click Next. The setup.ins script now resolves the path successfully and copies the InstallShield runtime plus the compbv51.cab payload to the target.
  4. When prompted for the serial number, enter the 12-character key from the certificate of license. The original media was shipped with a hardware-locked key; floating licenses are not supported.
  5. Allow the installer to register the CPX_DRV.DLL PROFIBUS driver and the CPBPROJ.MDB project template. The DoInstall phase must complete without a -4 return.
  6. Reboot if prompted and verify the program group Siemens Automation → COM PROFIBUS V5.1 appears in Start → Programs.

Hotfix and Service Pack Chain

After a clean V5.1 install, the patch baseline must be applied in ascending order. Each release contains the previous hotfix only as a prerequisite; HF1 does not ship HF2 or HF3.

Patch Scope Prerequisite
Hotfix 1 (HF1) Bug fixes for slave DBD file imports, EN 50170 V2 GSD parser V5.1 clean install
Hotfix 2 (HF2) Stability fix for online scan, IM 308-C firmware download V5.1 + HF1
Hotfix 3 (HF3) Final patch for Windows 2000 SP3/SP4 runtime; required for new project save paths V5.1 + HF2, Windows 2000 SP3 or SP4
Service Pack 2 (SP2) Diagnostics repeater support (Siemens 6ES7 972-0AB01) and DP/PA coupler GSDs V5.1 or V5.1 + SP1 baseline

Download the Service Pack 2 for COM PROFIBUS V5.1 (diagnostics repeater support) from the official Siemens Industry Online Support portal. Hotfix 1, Hotfix 2, and Hotfix 3 are linked from the same product tree under entry ID 6ES5895-6SE03.

Apply the patches in this exact sequence:

  1. Stop the COM PROFIBUS service Cpbsvc51 from services.msc.
  2. Run HF1\Setup.exe, accept the V5.1 detection, allow the patch to overwrite CPBUSR.DLL.
  3. Run HF2\Setup.exe, reboot if requested.
  4. Run HF3\Setup.exe. If the host is not Windows 2000 SP3/SP4, the installer rolls back with the same DoInstall setup.ins failed Return value = -4 message and the patch is not applied.
  5. Run SP2\Setup.exe for diagnostics repeater support.

Workarounds for Windows XP and Later Windows

Siemens does not certify COM PROFIBUS V5.1 on Windows XP or later, but field installations frequently run the tool on XP SP2/SP3, Windows 7 32-bit, and even Windows 10 32-bit compatibility layers. The Return -4 error appears first on these hosts and is resolved with the following procedure, which combines the two most reliable field-proven techniques.

Method 1 - Copy the media to the local hard disk

  1. Copy the entire CD contents to a local folder, for example:
    D:\Install\ComProfibus5_1\
    The folder name is 18 characters; the 8.3 rule applies to the install target, not the staging folder.
  2. Browse to ComProfibus5_1\compbv51\Disk1\ and double-click Setup.exe directly. Do not run the root Setup.exe from the CD root because its autorun stub is not 32-bit aware on XP.
  3. When prompted for the target, type:
    C:\ComProf
    Eight characters or less, no spaces.
  4. Complete the install and reboot.

Method 2 - 8.3 short-name and compatibility shim

  1. Enable the Windows 8.3 short-name generation. From an elevated command prompt:
    fsutil 8dot3name set D: 0
    This forces short names on the volume that hosts the install target.
  2. Pre-create the install directory with a short name:
    mkdir "C:\ComProfibus Application"
    dir /x C:\
    Note the COMPRO~1 short name returned by dir /x. Use that short name as the install path.
  3. Set the Setup.exe compatibility to Windows 2000 via the file Properties → Compatibility tab, with the Run as administrator checkbox enabled.
  4. Run the installer and supply the short-name path. The setup.ins validation passes, and the DoInstall phase writes the registry keys successfully.

Method 3 - Dual-boot Windows XP

If Methods 1 and 2 do not stabilize the install, prepare a dual-boot configuration with Windows 2000 SP4 as the secondary partition. Microsoft documents the procedure in the knowledge base article on creating a multiple-boot system in Windows XP. This is the only Siemens-recommended fallback path because it satisfies the official Windows 2000 SP3/SP4 prerequisite exactly.

Alternative: Migrate to STEP 7 / TIA Portal

For new deployments on a S5 DP master (IM 308C, CP 5431 FMS), the modern substitute is STEP 7 V5.7 plus a Hardware Support Package (HSP) for the legacy S5 DP master, or STEP 7 Professional (TIA Portal) with the S5 migration tool. The migration tool imports .CPB project files generated by COM PROFIBUS V5.1 and re-targets the DP configuration onto PROFINET via the IE/PB Link. Where a system cannot be migrated - for example, a brownfield retrofit on a SIMATIC S5-155H with a custom DP slave library - COM PROFIBUS V5.1 + HF3 + SP2 remains the only supported option, and the install workarounds above apply.

Verification

  1. Launch COM PROFIBUS V5.1 from the desktop shortcut. The splash screen must report build 5.1.3.0 (or higher if HF3 is installed) and the licensed user name.
  2. Open File → New Project, choose a master type (for example IM 308-C), and confirm the project tree shows Master → DP → Slot 0.
  3. Insert a known slave GSD, for example the Siemens ET 200S SIEM808F.GSD, into slot 4. The slot configurator must populate the module list without a parse error.
  4. Click Save As and store the project in a path that respects the 8.3 rule, for example C:\ComProf\Test.cpb. If the file saves without a Path too long dialog, the install is healthy.
  5. Optionally, attach a CP 5431 or IM 308-C over the parallel port and run Online → Scan Bus. The scan must enumerate the slaves on the segment without timing out at 30 s.

Troubleshooting Matrix

Symptom Root Cause Remediation
DoInstall setup.ins failed Return value = -4 on first install Target path > 8 characters or contains a space Re-run with a path such as C:\ComProf
Same -4 error after a hotfix install Windows 2000 host missing SP3/SP4 Apply SP4 then reinstall HF3
-4 error on Windows XP SP3 Host not certified; default Program Files path used Copy CD to HDD, run Disk1\Setup.exe, choose short path
Default install directory shows \ Validator failed to write a default; path resolution aborted Type the short path manually; do not accept the default
Installer aborts silently with no error code InstallShield 5.x runtime blocked by DEP on Windows XP SP3 Add Setup.exe to the DEP exception list
HF3 setup reports wrong version detected HF1 or HF2 missing Apply the chain in ascending order, reboot between each
CPBPROJ.MDB is read-only after install Installer ran as a non-admin user Re-run with an administrator account and clear the read-only attribute
Field-proven caveat. Even when COM PROFIBUS V5.1 installs and launches on Windows XP, the Online → Download to AS path that uses the CP_L2.DLL link to CP 5431 may still fault on XP SP3 due to changes in the parallel-port driver stack. Plan a dual-boot Windows 2000 SP4 partition if an online link to the AS is mandatory. The workarounds above are sufficient for offline configuration (GSD import, project editing, documentation export).

FAQ

What does Return value = -4 from setup.ins actually mean in COM PROFIBUS V5.1?

It is an InstallShield 5.x path-resolution fault. The most common triggers are an install target longer than 8 characters (for example C:\ComProfibus), a path that contains a space, or a Windows 2000 host that is missing Service Pack 3 or Service Pack 4. Re-run the installer with a short path such as C:\ComProf and confirm winver shows SP3 or SP4.

What is the Siemens order number for COM PROFIBUS V5.1?

The MLFB is 6ES5 895-6SE03. The product tree on Siemens Industry Online Support lists it as a discontinued item, with Hotfix 1, Hotfix 2, Hotfix 3, and Service Pack 2 available as separate downloads.

Can COM PROFIBUS V5.1 be installed on Windows XP?

Officially, no. Siemens support entry 8460601 states that no PROFIBUS configuration software is offered for XP. In practice, copying the CD to a local hard disk, launching ComProfibus5_1\compbv51\Disk1\Setup.exe, choosing a short 8.3 path, and setting Windows 2000 compatibility mode lets the installer complete on Windows XP SP2 or SP3. Apply Hotfix 1, Hotfix 2, and Hotfix 3 in that order after the base install.

What does Service Pack 2 for COM PROFIBUS V5.1 add?

SP2 introduces support for the Siemens diagnostics repeater (6ES7 972-0AB01) and the associated DP/PA coupler GSD libraries. It requires a baseline of V5.1 or V5.1 + SP1. It does not bundle HF1, HF2, or HF3, so the hotfix chain must be applied separately.

What replaces COM PROFIBUS V5.1 for S5 networks today?

STEP 7 V5.7 with the legacy S5 DP master HSP, or STEP 7 Professional (TIA Portal) with the S5 migration tool. The migration tool imports the .CPB project files produced by COM PROFIBUS V5.1 and re-targets the DP configuration onto PROFINET via the IE/PB Link. Where migration is impossible, COM PROFIBUS V5.1 + HF3 + SP2 on Windows 2000 SP4 remains the only supported option.

Back to blog