Auto-Start WinCC Flexible Runtime at Windows Boot for S7-314C

David Krause13 min read
HMI / SCADASiemensTutorial / How-to
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

Overview

WinCC Flexible Runtime does not natively hook itself into the Windows boot sequence when installed on a desktop PC acting as the HMI workstation. After an unplanned power loss, the OS re-starts, but the HMI screen stays blank until an operator manually launches the project (.fwx) and clicks Start Runtime. For installations where a SIMATIC S7-314C-2DP (6ES7314-6CGxx-0AB0) is being visualised through a desktop PC over MPI, that intervention requirement defeats the purpose of an unattended machine. This reference covers four reliable methods for forcing WinCC Flexible Runtime to launch automatically at logon, plus the verification and recovery steps required to make the configuration robust against brown-outs and dirty shutdowns.

The official guidance is documented in the SIMATIC HMI WinCC flexible 2008 Runtime manual. Chapter 2 (Getting Started) describes the runtime executable and the recommended procedure for booting directly into a project without operator input. Keep that PDF open while commissioning, since the dialog names below reference its terminology.

SIMATIC HMI WinCC flexible 2008 Runtime - User Manual (PDF)

Read first: All four methods below assume the runtime project (.fwx) is fully compiled and that the engineering station has the WinCC flexible Runtime licence transferred. A project that simply opens without activating is not Runtime - confirm the Start Runtime button on the toolbar lights up before chasing autostart issues.

Prerequisites

Item Specification Notes
Operating System Windows 7 SP1 / Windows 10 LTSC / Windows Server 2016 or newer Same editions supported by WinCC flexible 2008 SP5; Windows 10 1607+ needs the latest Hotfix
WinCC flexible Runtime 2008 SP5 (recommended) or 2005 / 2007 SP SP5 closes several COM/DCOM issues on 64-bit Windows
Compiled Runtime File *.fwx file generated by WinCC flexible ES Compiled from a transferred .hmi source
Runtime Licence Valid licence key (CF card or activated soft licence) on the PC Without a licence Runtime enters demo mode for 1 hour
PLC SIMATIC S7-314C-2DP (6ES7314-6CGxx-0AB0) Integrated MPI/PROFIBUS DP interface on X2
PC Adapter 6ES7972-0CB20-0XA0 (USB A2) or 6ES7972-0CB10-0XA0 Sets MPI termination and baud rate
User Rights Local administrator for HKLM methods HKCU and Startup-folder methods work as a standard user

How WinCC Flexible Runtime Boots

WinCC Flexible Runtime is a Win32 (or Win64 on newer builds) executable registered as a standard desktop application. It does not install a service, does not register a Boot Execute entry, and does not modify Winlogon by default. The intent is that most installations target a SIMATIC Panel PC (e.g. IPC277 or IPC477) where the CE / WinAC shell is configured to launch the runtime after boot. When the same runtime is repurposed onto a generic desktop PC, the operator must therefore provide the autostart hook manually.

Four mechanisms are supported, in order of troubleshooting preference:

  1. Startup folder shortcut - visible, easy to remove, runs at user logon in the logged-in user's security context.
  2. Registry Run key - runs at user logon (HKCU) or system logon (HKLM); invisible to most operators.
  3. Scheduled task with delay - survives a fast successive reboot and tolerates slow MPI negotiation, which is a frequent issue after a hard power cycle.
  4. WinCC flexible internal autostart - project property on the ES side that writes a boot entry into the registry at compile or transfer time.

Method 1 - Place a Shortcut in the Startup Folder

This is the simplest, most visible approach, and matches the recommended answer given in the runtime documentation. Locate the compiled runtime project file, then create a direct access (Windows shortcut) and drop it into the Startup folder of the user that owns the HMI session.

  1. Open the directory holding the *.fwx project, e.g. D:\HMI\Line3\Start.fwx or C:\Program Files\Siemens\WinCC flexible\Runtime\Projects\Line3.fwx.
  2. Right-click the *.fwx file, select Send to » Desktop (create shortcut).
  3. Open the Windows Run dialog (Win+R), type shell:startup, and press Enter. This opens the per-user Startup folder.
  4. Move or copy the shortcut from the desktop into the open Startup folder.
  5. Reboot the PC and confirm the shortcut executes by checking Task Manager » Details » HmiRTm.exe (the runtime host).

To autostart Runtime for every user that logs on to the PC, use the machine-wide Startup folder instead:

shell:common startup

This resolves to %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup. Items placed here fire irrespective of which Windows account logs in, which is what an industrial PC typically wants.

Startup folder paths at a glance
Scope Environment Variable Shell Command
Current user %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup shell:startup
All users %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup shell:common startup
Operator accounts: If you expect operators to log in with non-admin accounts, the per-user folder only fires after that operator has logged in once and the shortcut is present in their profile. Use the common Startup folder or a registry Run key (Method 2) for unattended boot scenarios.

Method 2 - Registry Run Key

For an invisible, unattended autostart that does not depend on the operator double-clicking a shortcut, register WinCC Flexible Runtime inside the Windows Run registry key. Two scopes are available.

Current user (HKCU)

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" ^
  /v "WinCCFlexibleRuntime" ^
  /t REG_SZ ^
  /d "\"C:\Program Files\Siemens\WinCC flexible\WinCC flexible Runtime.exe\" \"D:\HMI\Line3\Start.fwx\" /Run" ^
  /f

Local machine (HKLM)

reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" ^
  /v "WinCCFlexibleRuntime" ^
  /t REG_SZ ^
  /d "\"C:\Program Files\Siemens\WinCC flexible\WinCC flexible Runtime.exe\" \"D:\HMI\Line3\Start.fwx\" /Run" ^
  /f

Notes on parameter syntax:

  • The /Run switch tells the launcher to start Runtime immediately and skip the project selection dialog.
  • The leading " ... " pair around the executable path protects against spaces; the second quoted block is the project argument.
  • Use reg delete from a CMD prompt with admin rights to remove the entry cleanly.
32-bit on 64-bit OS: Some WinCC flexible 2005 / 2007 SP runtimes are still 32-bit binaries. On 64-bit Windows, the registry target must be the WOW6432Node hive:
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
Always verify the actual executable path under %ProgramFiles(x86)%\Siemens\... before writing the registry value.

Method 3 - Scheduled Task with Startup Delay

A common failure mode after a brown-out is that the Runtime starts before the PC Adapter finishes negotiating with the S7-314C-2DP, producing an immediate "Connection interrupted" alarm. A scheduled task with a delay insulates Runtime from the worst of the noise during early boot.

  1. Open Task Scheduler (taskschd.msc) and choose Create Task... (not the Basic Wizard).
  2. On the General tab, name the task WinCC_Flexible_Runtime, tick Run with highest privileges, and select Run whether user is logged on or not.
  3. On the Triggers tab, click New..., choose At startup, and tick Delay task for: » 30 seconds.
  4. On the Actions tab, click New... and enter:
    Program:    "C:\Program Files\Siemens\WinCC flexible\WinCC flexible Runtime.exe"
    Arguments:  "D:\HMI\Line3\Start.fwx" /Run
    Start in:   "C:\Program Files\Siemens\WinCC flexible\"
  5. On Settings, set If the task fails, restart every: to 1 minute with Attempt to restart up to: 3 times.
  6. Confirm with the credentials of the operator account that owns the licence.

The 30-second delay gives the MPI driver and the S7-314C-2DP time to complete their initial handshake. The auto-restart setting recovers from any "Runtime was terminated unexpectedly" event during power-up.

Method 4 - Project-Side Autostart (WinCC flexible ES)

WinCC flexible ES has a project property that, when enabled, inserts an autostart entry on the engineering station as part of the "Transfer" step. This is convenient for engineers testing the same project on a development PC before promotion to the plant floor.

  1. In the WinCC flexible project, open Project » Properties » Runtime.
  2. Tick Start Runtime automatically when Windows starts.
  3. Optionally tick Close project when Runtime exits to ensure no orphaned project remains in the editor.
  4. Save the project, recompile, and transfer the project to the target runtime PC.

This method writes the registry key described in Method 2 for you. If the operator later disables Runtime from the project menu, the registry entry remains and a second boot will re-trigger Runtime with the previously compiled project - so verify the project file path is still valid after any rebuild.

Tying the Runtime to the S7-314C-2DP Connection

An autostart hook that does not establish the MPI link is only half a solution. Within WinCC flexible ES, configure the connection on the same PC that hosts Runtime.

  1. In the project tree, right-click Connections and choose New Connection.
  2. Set Communication driver to SIMATIC S7 300/400.
  3. Set HMI station to S7-314C-2DP and pick the interface of the PC Adapter; for USB the entry is typically PC-Adapter (MPI).
  4. In Set PG/PC Interface on the PC, choose PC Adapter (MPI) » Auto (or the explicit USB socket if you have several PC Adapters attached).
  5. Set the MPI baud rate to 187.5 kbps for the S7-314C-2DP default; the dip switches on the CPU and the PC Adapter must both terminate and select the same baud rate.
  6. Verify connectivity with Tools » Test Connection; a healthy link returns "Online" within 2 s.
S7-314C-2DP MPI parameters
Parameter Value Notes
CPU part number 6ES7314-6CGxx-0AB0 Firmware variant depends on the version stamped on the front of the CPU
MPI address 2 (default) Changeable from HW Config » Properties » MPI Interface
Highest MPI address 31 Standard for S7-300 MPI networks
Baud rate 187.5 kbps Maximum supported by the integrated MPI port
Bus termination Enabled on end nodes only Termination resistors on the PC Adapter and at the end of the segment must be on; middle nodes off
Bus connector 6ES7901-0BB00-0AA0 (with PG socket) Outgoing MPI cable from the CPU has the PG socket for offline / online monitoring

Power-Loss Recovery and UPS Sizing

When the only practical answer to the operator is "reboot the HMI PC," an uninterruptible power supply closes the loop. Use the following sizing equation to estimate hold-up time:

t_holdup [min] = (battery_capacity_Wh * inverter_efficiency) / (load_W) * 60
Typical HMI PC load and hold-up
PC Average Load Peak Hold-up with 150 Wh brick
IPC227G (Celeron, fanless) ~25 W ~40 W ~3.5 h
Standard desktop (i3 + 8 GB) ~65 W ~110 W ~1.6 h
Workstation (i7 + 16 GB + SSD) ~120 W ~220 W ~1.0 h

Pair the UPS with Windows' built-in shutdown trigger so Runtime exits cleanly before the UPS drains. In Control Panel » Power Options » Change plan settings » Change advanced power settings, set Battery » Critical battery level » On battery: Shut down. This gives the scheduled task (Method 3) time to terminate Runtime gracefully; on the next power restoration, the PC reboots and Runtime comes up via the autostart hook without intervention.

UPS » PC wake-up: Most modern UPS units can be configured to send a wake-on-LAN or BIOS power-on signal after mains restoration. Enable the motherboard's "Restore on AC Power Loss" or "After Power Failure" setting so the PC boots without an operator pressing the power button.

Verification Procedure

After applying one of the methods above, prove the configuration with the following sequence.

  1. Close WinCC Flexible Runtime if it is open.
  2. Reboot the PC via Start » Power » Restart. Do not use the start menu's "Sign out" - only a full boot exercises the autostart hook.
  3. After Windows settles, log in with the operator account.
  4. Open Task Manager » More details and confirm HmiRTm.exe is present and consuming ~80-150 MB of RAM in the Processes tab.
  5. Click into the Runtime window; the last-saved Runtime screen should be active within ~5 seconds of project load.
  6. Pull a tag or write a known value through the Runtime to confirm the MPI connection to the S7-314C-2DP is live.

For Method 2 and Method 4, run regedit and confirm the entry survived the reboot. For Method 3, open Task Scheduler and inspect Last Run Result for the Runtime task; 0x0 indicates success.

Troubleshooting Matrix

Symptom Likely cause Fix
Shortcut visible but Runtime does not launch on boot Project file under a network drive that is not mapped at logon Move .fwx to a local path; map the drive via net use in a logon script
Runtime starts but immediately shows "Project not licensed" Licence removed or expired Re-authorise via Automation License Manager; archive C:\Program Files\Siemens\Automation License first
Runtime starts, then "Connection interrupted" alarm after 3 s MPI baud / address mismatch, or PC Adapter driver stalled Confirm dip switches; reinstall the PC Adapter driver (Siemens SIMATIC PC Adapter USB driver package)
Registry value shows in regedit but Windows ignores it Registry value contains non-escaped backslash or trailing spaces Rewrite the value with proper quoting; re-import the .reg file
Scheduled task reports 0x800710E0 "Operator or Administrator has refused the request" Task set to run only when user is logged on, and operator's password expired Change account password, or set task to Run whether user is logged on or not
Runtime starts on the first reboot, then disappears on subsequent reboots Antivirus quarantines HmiRTm.exe Add an exception in Windows Security » Virus & threat protection » Exclusions for the entire Siemens install folder
Runtime launches but immediately closes Compile error in the .fwx that was transferred Recompile on the engineering PC, re-transfer, monitor with the runtime trace flag
HMI session stops responding after brown-out MPI bus connector disconnected by vibration Lock the PG socket with a retaining screw (6ES7901-0BB00-0AA0); re-crimp after each shutdown
Runtime still opens the project selection dialog instead of auto-starting Argument syntax wrong in registry / shortcut Append /Run to the command line; check that the project file path has no UNC issues

Field-Proven Tips

  • Don't combine methods. Having both a startup folder shortcut and a scheduled task pointing at the same .fwx will spawn two Runtime processes; the second one fails to bind the project port and the operator sees a blank screen. Pick one and stick to it.
  • Document the project path. A surprising number of "Runtime won't start" tickets trace back to an engineer renaming a folder or moving the project to D:\Archive\... after commissioning. Pin the .fwx location inside the HMI documentation pack.
  • Schedule periodic compile-and-restart. For shops running 24/7 with no weekly window, a 4 am Sunday reboot scheduled via Task Scheduler clears COM/DCOM leaks and gives the autostart hook a clean run.
  • Keep the legacy MSI installer. WinCC flexible is end-of-life - new PC deployments on Windows 10/11 LTSC require SP5 plus the relevant Hotfix. Without the original installation media in a known location, recovery after a failed SSD becomes much harder.
  • Use the engineering RS232 null-modem cable as fallback. The S7-314C-2DP serial port (X1) accepts a Siemens RS232 PC cable (6ES7901-2BF00-0AA0) which can be used to re-flash the project if both MPI and PROFINET are unavailable.
Safety note: Visualising a safety-related process via WinCC Flexible Runtime on a generic desktop PC does not make the PC a safety controller. The PROFINET/PROFIsafe pathway into the SIMATIC S7-300F CPU is independent of WinCC flexible and must be designed separately. Treat Runtime only as an operator interface.

FAQ

Where do I find the compiled WinCC flexible runtime file (.fwx)?

The compiled runtime is produced by WinCC flexible ES via Project » Compile » Runtime. The default output directory is a subfolder of the project tree, e.g. C:\Program Files\Siemens\WinCC flexible\Runtime\Projects\<ProjectName>.fwx. Transfer the file from the engineering station to the runtime PC before applying any autostart method.

What is the difference between the startup folder and the Run registry key?

The Startup folder is essentially a graphical view of an entry that ends up under HKLM\...\Explorer\StartupApproved\Run. The Run registry key (HKCU\...\Run or HKLM\...\Run) achieves the same result but is invisible to most operators. Use the registry when you also need to pass command-line arguments (such as /Run); use the Startup folder when operators may need to remove the entry themselves.

Why does Runtime start but not connect to the S7-314C-2DP?

Three causes are most common: (1) PC Adapter baud rate mismatch with the CPU MPI default of 187.5 kbps; (2) MPI addresses duplicated on the segment; (3) the PC Adapter's USB driver not yet initialised when Runtime attempts to bind. Diagnose with Start » Programs » Siemens Automation » Set PG/PC Interface » Diagnostics. Switching to the scheduled-task method (Method 3) with a 30-second delay will mask the third cause.

Which command-line switch forces Runtime to start without showing the project selection dialog?

The /Run switch. The full command becomes: "C:\Program Files\Siemens\WinCC flexible\WinCC flexible Runtime.exe" "D:\HMI\Line3\Start.fwx" /Run. Without /Run, the project is loaded but Runtime waits for the user to press the start button, which still requires operator intervention.

Will the autostart survive an OS upgrade from Windows 7 to Windows 10?

In-place upgrades preserve the Startup folder contents and the registry Run keys, so yes. Confirm the WinCC flexible 2008 SP5 (or later) runtime remains compatible with the new OS - the Siemens Hotfix for Windows 10 1607+ is usually required. After upgrade, run the verification procedure in this article to confirm Runtime starts unattended.

Back to blog