Resolving WinCC flexible 2008 SP2 Uninstall HmiES Lock Error

David Krause9 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 Statement

During uninstallation of Siemens WinCC flexible 2008 SP2 (and adjacent builds such as SP3/SP4 ES and Runtime), the installer halts immediately after launch with the following message:

Please close the application WinCC flexible, reboot your computer and start this setup again.

Rebooting the workstation does not clear the condition. The Setup guard returns the same prompt on every retry, blocking both uninstall and reinstall paths. The error originates from the WinCC flexible setup bootstrap (setup.exe) which probes for a sentinel — the running HmiES.exe process and several SIMATIC HMI services — and refuses to proceed if any of them are present in a state it interprets as "application open".

Symptom class: Setup bootstrap refusal. Distinct from MSI error 1603, missing dependency errors, or license key conflicts. Confirm by checking that Setup exits before the component-selection screen appears and never displays the EULA.

Affected Versions and Environment

Component Verified Affected Likely Affected
WinCC flexible 2008 SP2 ES Yes (reported) —
WinCC flexible 2008 SP3 / SP4 ES — Yes (shared bootstrap)
WinCC flexible 2008 Runtime — Yes (same HmiES service family)
WinCC flexible 2007 / 2005 — Possible (legacy SIMATIC HMI services)
Windows XP SP3 Yes (reported) —
Windows 2000 SP4 Yes (reported in linked KB) —
Windows Vista SP1/SP2 Yes (reported in linked KB) —
Windows 7 (32-bit) — Yes (officially supported for SP2/SP3/SP4)

Root Cause Analysis

The WinCC flexible setup bootstrap performs three independent guard checks at startup. Any single failure causes the "close the application" prompt:

  1. Process scan: Enumerates running processes for HmiES.exe, HmiRTm.exe, CCStartSm.exe, and the WinCC flexible ES IDE shell HMIRES.exe.
  2. Service scan: Probes the SCM (Service Control Manager) for installed SIMATIC HMI services that report START_PENDING or RUNNING.
  3. Pending-file-rename / reboot flag: Checks the registry value PendingFileRenameOperations under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager. If non-empty, Setup returns the prompt even when no WinCC process is running.

Two distinct failure modes are documented in the field:

Mode Trigger Observable Resolution Path
A — Orphaned HmiES Previous WinCC flexible ES session terminated abnormally (BSOD, kill -9, power loss) HmiES.exe visible in Task Manager after reboot; CPU near 0%, RAM ~30-80 MB Terminate process via Task Manager (Solution 1)
B — Locked services SCM has SIMATIC HMI services set to Manual or Automatic with delayed start; SCM reports them in START_PENDING No WinCC process visible, but Setup still refuses; sc query shows services in START_PENDING Disable services via msconfig (Solution 2) or stop via sc
C — Pending reboot Earlier MSI install/deinstall left PendingFileRenameOperations populated Setup prompt returns even on a freshly rebooted machine; no WinCC processes Clear pending operations via registry (Solution 3) and reboot
Engineer field note: On Windows XP and 2000, Mode A and Mode B frequently co-occur because the orphaned process holds a handle to the service binary, keeping the SCM in START_PENDING. Address Mode A first, then re-check Mode B.

Solution 1 — Terminate the Orphaned HmiES Process

This is the fastest path when an HmiES.exe instance is left running after a crash or forced logoff.

Procedure

  1. Press Ctrl+Shift+Esc to open Windows Task Manager.
  2. Select the Processes tab. On Windows 2000/XP, enable Show processes from all users via the checkbox at the bottom.
  3. Locate any of the following processes (each is independently capable of triggering the guard):
    • HmiES.exe — WinCC flexible Engineering Station shell
    • HmiRTm.exe — Runtime manager
    • CCStartSm.exe — Control Center starter / sm@rtClient
    • HMIRES.exe — Engineering resource service
  4. Select the process and click End Process. Confirm the warning dialog.
  5. If the process re-spawns within 2-3 seconds, a service is launching it. Proceed to Solution 2 first, then return.
  6. Re-launch the WinCC flexible 2008 SP2 Setup immediately without rebooting.
Tip: If Task Manager shows the process under a different user context (SYSTEM instead of your user), switch Task Manager to All Users first. You must be a member of the local Administrators group to terminate SYSTEM-owned processes on XP/2000.

Solution 2 — Disable SIMATIC HMI Services via msconfig

This addresses Mode B (locked services) and is also effective as a preventive measure before reinstall.

Procedure

  1. Close all open applications.
  2. Click Start → Run, type msconfig, press Enter.
  3. Switch to the Services tab.
  4. Check Hide all Microsoft services to filter out OS services.
  5. Locate every service whose Manufacturer or Display Name contains SIMATIC HMI or Siemens AG. Typical entries:
Service Name (registry) Display Name Default Startup
SIMATIC HMI SIMATIC HMI Manual
CCAgent CCAgent Manual
CCStartSm CCStartSm Manual
s7oiehsx S7DOS Help Service Automatic
HmiEsSrv HmiEsSrv (where present) Manual
  1. Uncheck the checkbox next to every Siemens entry. Confirm Disable.
  2. Click OK. msconfig prompts to reboot — accept.
  3. After reboot, run Setup. The guard will pass because no SIMATIC HMI service is in START_PENDING state.
  4. Once uninstall (or install) completes, return to msconfig → Services and re-enable the entries you disabled. Reboot once more.
Alternative (no GUI): From an elevated command prompt, run sc config "SIMATIC HMI" start= disabled for each service, reboot, then run Setup. Re-enable with sc config "SIMATIC HMI" start= demand after the operation.

Solution 3 — Clear the Pending-File-Rename Reboot Flag

Use this when Solutions 1 and 2 fail and the prompt persists on a clean boot with no visible WinCC processes.

Procedure

  1. Open regedit as Administrator.
  2. Navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager.
  3. Inspect the value PendingFileRenameOperations (type REG_MULTI_SZ). If populated, it lists file paths with rename/delete actions queued for the next boot.
  4. Export the key as a safety backup (File → Export).
  5. Delete the PendingFileRenameOperations value only. Do not delete the parent key.
  6. Reboot, then run Setup.
Warning: Deleting the pending-rename list abandons the queued file operations. If the queue contains legitimate moves required by an unfinished MSI install of a different product, that product may be left in an inconsistent state. Verify the queue contents first — entries pointing under %ProgramFiles%\Siemens\Automation\ are safe to discard after manual cleanup.

Solution 4 — MSI Cleanup with the Windows Installer Cleanup Utility

If Setup continues to fail after applying Solutions 1-3, an MSI database entry for WinCC flexible may be orphaned in the Windows Installer registry.

Procedure

  1. Download the legacy Windows Installer Cleanup Utility (MSICUU2.exe) — note that Microsoft has retired public distribution; obtain from an internal Microsoft portal or an approved ESD source if your environment permits.
  2. Launch msicuu2.exe and remove any entry whose product name begins with WinCC flexible or whose publisher is Siemens AG.
  3. Reboot and re-attempt Setup.
Microsoft guidance: Microsoft officially recommends msicuu2 only as a last resort and prefers MsiInv inventory + targeted msiexec /x {ProductCode} removal. If you choose the latter, query the WinCC flexible ProductCode from HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall before uninstalling.

Solution 5 — Clean Reinstall Procedure (Post-Uninstall)

After successful uninstall, follow this sequence to install a known-good copy of WinCC flexible 2008 SP2 (or upgrade to SP3/SP4):

  1. Confirm the install media matches the build. Mount the ISO or insert the DVD; verify the setup.exe size matches the manifest in the package.
  2. Temporarily disable antivirus real-time scanning. SIMATIC HMI installs write large numbers of registry entries and files; aggressive AV heuristics can interrupt the MSI sequence and reintroduce the pending-reboot flag.
  3. From the elevated context, run setup.exe /silent for unattended deployment or simply launch setup.exe interactively.
  4. After install, re-enable the SIMATIC HMI services via msconfig or sc config.
  5. Apply the latest hotfix from the Siemens support portal. Search for the WinCC flexible 2008 SP2/3/4 readme referencing your target panel family (e.g., MP 277, TP 177B, Comfort Panels).
  6. Activate the license via Automation License Manager. A missing license does not cause the uninstall prompt but causes silent Runtime exit shortly after project start.

Verification

After Setup completes, validate the installation state with the following checks:

Check Command / Location Expected Result
Program Files present %ProgramFiles%\Siemens\Automation\WinCC flexible 2008 SP2\ Directory exists with HmiES.exe
Service installed sc query "SIMATIC HMI" STATE: STOPPED or RUNNING depending on start mode
License Automation License Manager → WinCC flexible entry Valid license displayed
Project compile Open ES → any sample project → Compile → Generate No errors; .fwx / .tpe generated
Runtime transfer Configure a TP/MP panel → Transfer → Ethernet/RS232 Successful transfer with green status
No leftover setup guard Re-run Setup → click Uninstall on the maintenance screen Guard does not appear

Siemens Official Reference

The same class of issue is addressed in Siemens Entry ID 28465761, which documents the message:

"Please restart Windows before installing new programs"

and applies to Windows XP / 2000 / Vista. Although the entry text differs from the "close the application" wording observed in the field, both prompts originate from the same Setup bootstrap guard family, and the remediation in the Siemens KB — a forced reboot and Windows Installer cleanup — is consistent with the procedure above.

Log location: When Setup fails on later Windows versions, examine %TEMP%\Siemens\Setup.log and %WINDIR%\Temp\MSI*.log for the actual guard step that fired. The exact subsystem (process scan vs. service scan vs. pending reboot) determines which Solution to apply first.

Troubleshooting Matrix

Symptom First Action If No Improvement Final Action
HmiES.exe visible in Task Manager End process (Solution 1) Disable services in msconfig (Solution 2) Reboot + retry Setup
No WinCC processes, but Setup refuses Check SCM via sc query Disable services in msconfig (Solution 2) Clear PendingFileRenameOperations (Solution 3)
Setup fails mid-install with error 1603 Clear %TEMP%, disable AV Repair .NET Framework 2.0/3.0 if present Solution 4 (msicuu2)
Setup aborts immediately with "missing MSI" Recopy DVD; verify ISO checksum Run setup.exe as Administrator Reimage workstation
Runtime starts then exits silently Verify license in ALM Reinstall license key Check HMI device driver in Device Manager

Prevention Checklist

  • Always shut down WinCC flexible ES via File → Exit, never by closing the IDE window directly. Power-user shortcut: do not log off with HmiES still in the foreground.
  • Before any Windows Update or major AV update, close ES and stop SIMATIC HMI services to avoid leaving PendingFileRenameOperations populated.
  • Maintain a Windows Installer baseline image (WIM) of the engineering workstation so a known-good state can be restored in < 30 minutes.
  • Use a dedicated local Administrator account for WinCC flexible installs — not a domain user with roaming profile and not a non-admin UAC-elevated session.
  • Document the install build (SP2/SP3/SP4 + Hotfix number) on the workstation asset record; reuse the exact build across the fleet to simplify license management and update propagation.

Why does WinCC flexible 2008 SP2 refuse to uninstall with the message "Please close the application" even after a reboot?

The Setup bootstrap performs a process and service scan before allowing the uninstaller to run. An orphaned HmiES.exe process, a SIMATIC HMI service stuck in START_PENDING, or a non-empty PendingFileRenameOperations registry value will each independently trigger the prompt. Open Task Manager and end HmiES.exe, then disable all Siemens entries in msconfig → Services and reboot.

What is the HmiES.exe process and is it safe to terminate?

HmiES.exe is the WinCC flexible 2008 Engineering Station shell — the IDE host process. Terminating it via Task Manager / taskkill /F /IM HmiES.exe is safe when no project is open or compiling. Unsaved changes in any open project will be lost; save before terminating.

Which Siemens services should I disable before running Setup?

Disable every service whose publisher or display name references SIMATIC HMI or Siemens AG, including SIMATIC HMI, CCAgent, CCStartSm, and s7oiehsx. Use msconfig → Services → Hide all Microsoft services → uncheck the Siemens entries, or run sc config "SIMATIC HMI" start= disabled from an elevated command prompt.

How do I clear the "Please restart Windows before installing new programs" flag on Windows XP or Vista?

Open regedit as Administrator and navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager. Export the key for backup, then delete the PendingFileRenameOperations value (type REG_MULTI_SZ) and reboot. The Windows Installer will then allow new setups to run.

Where can I find the official Siemens note about the WinCC flexible Setup guard failure?

Siemens Entry ID 28465761 in the Siemens Industry Online Support portal documents the related "Please restart Windows before installing new programs" message and applies to Windows XP / 2000 / Vista installations of WinCC flexible and adjacent SIMATIC HMI software.

Back to blog