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".
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:
-
Process scan: Enumerates running processes for
HmiES.exe,HmiRTm.exe,CCStartSm.exe, and the WinCC flexible ES IDE shellHMIRES.exe. -
Service scan: Probes the SCM (Service Control Manager) for installed
SIMATIC HMIservices that reportSTART_PENDINGorRUNNING. -
Pending-file-rename / reboot flag: Checks the registry value
PendingFileRenameOperationsunderHKLM\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 |
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
- Press
Ctrl+Shift+Escto open Windows Task Manager. - Select the Processes tab. On Windows 2000/XP, enable Show processes from all users via the checkbox at the bottom.
- 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
-
- Select the process and click End Process. Confirm the warning dialog.
- If the process re-spawns within 2-3 seconds, a service is launching it. Proceed to Solution 2 first, then return.
- Re-launch the WinCC flexible 2008 SP2 Setup immediately without rebooting.
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
- Close all open applications.
- Click Start → Run, type
msconfig, press Enter. - Switch to the Services tab.
- Check Hide all Microsoft services to filter out OS services.
- Locate every service whose Manufacturer or Display Name contains
SIMATIC HMIorSiemens 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 |
- Uncheck the checkbox next to every Siemens entry. Confirm Disable.
- Click OK. msconfig prompts to reboot — accept.
- After reboot, run Setup. The guard will pass because no SIMATIC HMI service is in
START_PENDINGstate. - Once uninstall (or install) completes, return to
msconfig→ Services and re-enable the entries you disabled. Reboot once more.
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
- Open
regeditas Administrator. - Navigate to
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager. - Inspect the value
PendingFileRenameOperations(typeREG_MULTI_SZ). If populated, it lists file paths with rename/delete actions queued for the next boot. - Export the key as a safety backup (File → Export).
- Delete the
PendingFileRenameOperationsvalue only. Do not delete the parent key. - Reboot, then run Setup.
%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
- 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.
- Launch
msicuu2.exeand remove any entry whose product name begins withWinCC flexibleor whose publisher isSiemens AG. - Reboot and re-attempt Setup.
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):
- Confirm the install media matches the build. Mount the ISO or insert the DVD; verify the
setup.exesize matches the manifest in the package. - 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.
- From the elevated context, run
setup.exe /silentfor unattended deployment or simply launchsetup.exeinteractively. - After install, re-enable the SIMATIC HMI services via
msconfigorsc config. - 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).
- 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.
%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 HMIservices to avoid leavingPendingFileRenameOperationspopulated. - 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.