Resolving WinCC Advanced RT Full Screen Loss on Remote Desktop

David Krause12 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

Resolving WinCC Advanced RT Full Screen Loss on Remote Desktop

When a Windows 7 Pro host running WinCC Advanced Runtime (RT) v13 SP1 Update 7 under TIA Portal is taken over with Remote Desktop Connection (RDC / mstsc.exe), VNC, or RAdmin, the Runtime window drops out of full-screen mode. The Windows taskbar reappears at the bottom of the screen, and the Runtime no longer occupies the entire display. The condition persists after the remote session is terminated; only a manual restart of WinCC RT restores the full-screen layout. The same panel that runs under TeamViewer is unaffected, but TeamViewer's per-seat licensing is often not justifiable for engineering or service access only.

This article documents the underlying cause, the two field-proven resolutions, and the workarounds that have been used on production machines. It also lists the SetDisplayMode limitation and the exact registry / configuration changes that keep the Runtime in full-screen mode across inbound remote sessions.

1. Problem Statement

Symptom. WinCC Advanced Runtime is configured for full-screen operation in the TIA Portal project. The "Full-screen mode" and "Lock task switching" options are both enabled in the Runtime settings. On local console use the Runtime occupies the entire primary display. As soon as an engineer or service technician opens a Remote Desktop session, attaches a VNC viewer, or connects with RAdmin:

  1. The Windows taskbar appears.
  2. WinCC Advanced Runtime exits full-screen and resizes to a windowed layout.
  3. The minimize, maximize, and close buttons become non-functional.
  4. When the remote session ends, Runtime stays in windowed mode; the taskbar stays visible.
  5. Only a full restart of RTIL.exe (WinCC Advanced Runtime loader) restores full-screen.

Affected software.

  • WinCC Advanced RT v13 SP1 Update 7 (part of TIA Portal V13 SP1)
  • Operating System: Windows 7 Professional (x64) with Aero theme enabled
  • Remote clients tested: Microsoft Remote Desktop Connection (mstsc.exe), RealVNC Viewer, TightVNC, RAdmin 3.x
  • Remote clients that work without modification: TeamViewer (licensed per seat)

Business impact. Operators lose the locked-down single-purpose HMI behaviour that the "Lock task switching" flag is meant to provide. The Windows desktop is exposed, allowing accidental termination of Runtime, file-system access, or launch of unrelated applications while a remote engineer is connected.

2. Root Cause Analysis

The dominant root cause is a Windows 7 theme switch triggered by inbound Remote Desktop sessions.

When a remote session is negotiated with a client that does not advertise full RemoteFX / Aero redirection capability, the Windows 7 host switches the active visual theme from Windows 7 Aero to Windows 7 Basic for the duration of the session. The theme reverts when the session ends. WinCC Advanced Runtime is built against the Aero presentation layer; on the theme switch it receives a window-style change message that causes the Runtime main window to drop out of exclusive full-screen state into a regular overlapped window. Because the same window class is reused after the session is closed, the Runtime does not automatically restore its previous maximized / exclusive state.

This behaviour is documented in Microsoft support material for similar Remote Desktop display issues (Microsoft Learn: Can't maximize RDC session window to full-screen) and is consistent with the field experience reproduced on the affected WinCC Runtime host.

Secondary contributors observed on the same hardware image:

  • VNC viewers using CaptureMode = 0 (default) inject a virtual display driver hook that also forces Win32 windows out of exclusive full-screen.
  • RAdmin uses a mirror driver that triggers the same theme-downgrade as RDP.
  • TeamViewer uses a frame-buffer capture that does not interact with the host window manager, hence Runtime is not disturbed.

3. Solution A — Disable Aero, Use Windows Classic Theme

This is the cheapest and most reliable fix. Switching the host theme to Windows Classic removes the Aero DWM layer that is the source of the theme-switch side effect on RDC and RAdmin attach.

3.1 Apply the theme on the host

  1. Log on to the WinCC Advanced Runtime PC at the physical console with administrator credentials.
  2. Right-click Desktop > Personalize.
  3. Select Windows Classic from the list of themes.
  4. Click Apply, then OK.
  5. Reboot to make the theme selection permanent for the auto-logon operator account.

3.2 Verify Runtime settings still match the TIA Portal project

Confirm in the TIA Portal project that Runtime settings > Screen > Full-screen mode and Runtime settings > Screen > Lock task switching remain enabled. The TIA Portal V13 SP1 documentation describes these options under Configuring display in Runtime - WinCC; the option semantics are identical from V13 through V20.

3.3 Re-test

  1. Start WinCC Advanced Runtime, confirm full-screen display.
  2. From a remote client, launch Remote Desktop Connection and connect.
  3. Confirm Runtime remains full-screen during the active session.
  4. Disconnect the session.
  5. Confirm Runtime remains full-screen after disconnect; no manual restart required.

Result on the affected hardware. With Windows Classic theme enabled, RDC and RAdmin attach/detach events no longer alter the Runtime window state. The trade-off is the loss of Aero visual effects on the operator desktop; for a single-purpose Runtime host this is normally acceptable.

4. Solution B — RealVNC With CaptureMode = 1

If the customer requires a richer desktop theme or needs VNC for cross-platform access, RealVNC Server can be configured so its screen-capture mechanism does not break the host's full-screen Runtime window.

4.1 Required software

  • RealVNC Server 5.x or 6.x (Free or Personal license tier is sufficient for the CaptureMode override; Enterprise tier is required for the Expert tab UI in some builds).
  • RealVNC Viewer on the remote client.

4.2 Configure CaptureMode

  1. On the WinCC host, right-click the RealVNC Server tray icon and choose Options.
  2. If the dialog only shows Basic settings, hold Shift while clicking Options to unlock the expert configuration tree.
  3. Navigate to Expert > CaptureMethod (or Capture > CaptureMethod depending on build).
  4. Set the value to 1 (mirror driver disabled; polling-based capture).
  5. Click Apply and restart the RealVNC Server service.
CaptureMode Mechanism Effect on WinCC full-screen
0 Mirror driver injection (default) Runtime drops to Window mode on attach
1 Polled screen capture, no driver hook Runtime remains full-screen
2 DirectX hook Behaviour depends on graphics driver; not recommended

4.3 Verification

  1. Start WinCC Advanced Runtime in full-screen.
  2. Connect from a remote client with RealVNC Viewer.
  3. Disconnect.
  4. Confirm Runtime is still in full-screen state and the taskbar is not visible.

5. Workaround — Kill explorer.exe to Hide the Taskbar

If neither of the above is acceptable, the taskbar can be removed by terminating the Windows shell process. This is a hostile-user workaround and should be combined with administrative authentication on Runtime to prevent operators from re-launching explorer.exe.

5.1 VBScript snippet for WinCC Advanced

WinCC Advanced Runtime only supports VBScript (not C-script). Place the following script behind an event that fires once at Runtime start, e.g. the Opened event of the start screen or a scheduled task in the Windows scheduler triggered by WinCC startup.

' KillExplorer.vbs
' Removes the Windows shell / taskbar. Use with caution.
Option Explicit

Dim objShell
Set objShell = CreateObject("WScript.Shell")

' Terminate explorer.exe on the interactive session
objShell.Run "taskkill /F /IM explorer.exe", 0, True

Set objShell = Nothing

5.2 Restoring explorer.exe (administrative button)

Provide an HMI button that is only enabled when an operator with the correct user group is logged in. The button triggers:

' RestartExplorer.vbs
Option Explicit

Dim objShell
Set objShell = CreateObject("WScript.Shell")

objShell.Run "explorer.exe", 1, False

Set objShell = Nothing

5.3 Caveats

  • If the Runtime crashes, the desktop remains shell-less; technicians must launch explorer.exe from Task Manager > File > Run to restore the shell.
  • Some OEM management agents and printer tray icons depend on explorer.exe and will not load.
  • This is a mitigation only — it hides the taskbar but does not fix the underlying Runtime full-screen state loss.

6. SetDisplayMode System Function — Why It Is Not a Cure

The TIA Portal system function SetDisplayMode can be scripted from the start screen or invoked on a tag change. Calling SetDisplayMode with parameter value 2 (Full screen) re-asserts the Runtime full-screen state. In practice it has two field-proven problems:

  1. Focus theft. The Runtime main window receives a WM_ACTIVATE / WM_SETFOCUS side-effect that cancels any input currently being entered into an I/O field. If a tag change triggers the call while an operator is typing a setpoint, the entry is lost.
  2. Re-arm requirement. After every RDC attach/detach pair a new invocation is needed. A polled tag with a 5-minute timeout pattern works but is fragile.

6.1 Polled re-arm (acceptable only as a belt-and-braces)

' On the start screen, schedule a cyclic event:
' Cycle: 5 minutes
' Event: Run script
' Script body:
SetDisplayMode 2   ' Full screen

This works only as a tertiary safeguard on top of Solution A or Solution B, not as the primary fix.

7. Alternative Architectures

Option Mechanism Keeps full-screen Cost Notes
Sm@rtServer / Sm@rtClient Native TIA Portal remote HMI session Yes Per-Runtime licence Exits the Runtime to expose the OS, same root issue as RDC; license cost makes it unsuitable for cheap engineering access
TeamViewer Frame-buffer remote control Yes Per-seat subscription Does not interact with the host window manager; works out of the box
RealVNC CaptureMode=1 Polled VNC Yes Free / low cost Recommended VNC fix; Solution B in this article
Windows Classic theme Aero DWM removed Yes None Recommended RDC fix; Solution A in this article
RDP-only access Remote Desktop Session Host Only with Classic theme None Requires OS theme workaround
IP KVM / hardware KVM Out-of-band keyboard/video/mouse Yes (Runtime unaware) Hardware cost Most robust option for sites with multiple Runtime PCs

8. Verification Matrix

Test step Expected result Pass criterion
Local console, Runtime start Full screen, taskbar hidden Runtime occupies 100 % of primary display
RDC attach from remote client Runtime stays full-screen No taskbar visible in either session
RDC disconnect Runtime stays full-screen No manual restart required
VNC attach (RealVNC, CaptureMode=1) Runtime stays full-screen No taskbar visible
VNC disconnect Runtime stays full-screen No manual restart required
Operator value entry during RDC session Focus retained in I/O field Value can be entered without losing focus
Operator value entry after RDC session ends Focus retained Same as above
Restart Runtime via RTIL.exe Returns to full-screen Default behaviour, no regression

9. Troubleshooting Matrix

Observed behaviour Likely cause Resolution
Runtime drops to Window mode on RDC attach; Aero enabled Theme downgrade to Windows 7 Basic Apply Solution A (Windows Classic theme)
Runtime drops to Window mode on VNC attach VNC mirror driver interferes with full-screen Apply Solution B (RealVNC CaptureMode=1)
Runtime stays full-screen during RDC attach, taskbar appears on disconnect Theme reversion path Apply Solution A and verify theme is locked for auto-logon user
Minimize / maximize buttons greyed out after remote session Runtime main window in non-maximizable state Restart Runtime, or invoke SetDisplayMode 2 (focus loss caveat)
Taskbar visible, SetDisplayMode 2 script loses operator input focus SetDisplayMode focus side-effect Avoid relying on SetDisplayMode; apply Solution A or B
Operator can re-launch explorer.exe after kill-script Operator has local admin rights Restrict Runtime user group to non-admin; gate explorer restart button behind elevated authentication
Full-screen breaks only on second RDC attach Theme cache not refreshed between sessions Reboot after applying Windows Classic theme; remove "Allow users to change theme" via Group Policy
RealVNC option not visible in tray UI Free edition UI hides Expert tab Hold Shift while clicking Options, or edit registry value CaptureMethod under HKLM\Software\RealVNC\vncserver

10. Group Policy Lock-Down (Recommended Add-On)

To prevent operators or RDP users from reverting the Windows Classic theme and re-introducing the issue, lock the theme selection through Group Policy:

  1. Open gpedit.msc on the host (or push via Active Directory GPO).
  2. Navigate to User Configuration > Administrative Templates > Control Panel > Personalization.
  3. Enable Prevent changing theme.
  4. Navigate to User Configuration > Administrative Templates > Control Panel > Personalization > Desktop.
  5. Enable Prevent changing desktop background (optional, to lock down the operator UI).
  6. Run gpupdate /force from an elevated command prompt.

This blocks the theme from being switched back to Aero by an operator with local access, securing the resolution permanently.

Safety notice. WinCC Advanced Runtime is intended to be the only process visible to the operator. Any change that exposes the Windows shell must be paired with a documented recovery procedure. Validate every change on a non-production Runtime before applying to a live HMI.

11. Related Settings in TIA Portal

To harden Runtime against accidental mode changes regardless of the remote access path, verify the following in the project:

Runtime setting Recommended value Path in TIA Portal
Full-screen mode Enabled Runtime settings > Screen > Full-screen mode
Lock task switching Enabled Runtime settings > Screen > Lock task switching
Disable direct keys Enabled (panel only) Runtime settings > Screen > Direct keys
Hide Windows taskbar at Runtime start Enabled Runtime settings > Screen > Hide taskbar
Close automatic on screen change Per project decision Runtime settings > Screen > Close automatic on screen change
Allow operator to change password Disabled Runtime settings > User administration
Auto-logoff 15 minutes Runtime settings > User administration > Auto-logoff

The settings above align with the documented WinCC configuration options described in Configuring display in Runtime - WinCC.

12. FAQ

Why does WinCC Advanced RT drop out of full screen when I connect with Remote Desktop?

The Remote Desktop client triggers a Windows 7 theme downgrade from Aero to Windows 7 Basic on the host. WinCC Advanced Runtime is bound to the Aero presentation layer and exits exclusive full-screen when the theme changes. The Runtime does not re-enter full-screen when the session ends.

What is the cheapest fix for the RDC full-screen problem?

Switch the host theme from Windows 7 Aero to Windows Classic. No additional software, no additional licence, and no impact on Runtime functionality. Lock the theme change with Group Policy so it cannot be reverted by an operator.

How do I configure RealVNC to keep WinCC full-screen?

Open RealVNC Server Options with Shift held down to expose the expert settings. Set CaptureMode (CaptureMethod) to 1 to use polling instead of the mirror driver. RealVNC then reads the framebuffer without injecting a virtual display driver, so the Runtime full-screen state is preserved across attach and detach.

Can I use the SetDisplayMode system function to restore full-screen automatically?

Yes, calling SetDisplayMode with value 2 restores full-screen, but it steals focus from any I/O field that the operator is currently typing into. Use it as a last resort, scheduled no more than every five minutes, and only after applying the Aero / VNC fixes described above.

Will TeamViewer keep WinCC in full-screen without configuration?

Yes. TeamViewer uses a frame-buffer capture that does not interact with the host window manager, so the Runtime window state is not modified during a TeamViewer session. The cost is per-seat licensing, which is why most engineering teams replace it with RealVNC CaptureMode=1 or with the Windows Classic theme workaround.

Back to blog