WINCC DMExitWinCCEx(DM_SDMODE_REBOOT) – Reboot from inside a RDP Session Fails.

Written by James McDonald

November 1, 2013

I have a Siemans control system that was installed circa 2005 which hasn’t had an operating system or software upgrade since, so it’s running on Windows XP Pro.

To give it a bit more life I virtualized it and moved it into a vSphere environment running in a locked server room.

So now the Humans that access the control system interfaces connect to the virtualized Windows XP O/S using RDP.

The problem is that once you move a HMI (Human Machine Interface) into a server room and onto the VMWare platform there is no power button to press.

The WINCC project was calling DMExitWinCCEx(DM_SDMODE_POWEROFF) to turn the old computer off and the operator could just restart with a finger on the power button.

However now if they need to power cycle the control system the poweroff option leaves them stuck.

I tried to change the code to DMExitWinCCEx(DM_SDMODE_REBOOT) and this appeared to work but the reboot was being interrupted (i think) by the “if you shutdown this remote computer, no one can use it until someone at the remote location manually restarts it. Do you want to continue? yes/no” prompt. By interrupted I mean WINCC would exit, disconnect the RDP session but the Windows XP OS would stay running.

To get it to work with WINCC calling DMExitWinCCEx(DM_SDMODE_REBOOT) from within a RDP Terminal Session was to disable multiple sessions on the XP server.

run regedit.exe and browse to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Double click AllowMultipleTSSessions and set it to 0. Restart the box and give it another go.

[ref 1] Comment by “Mr. James”


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…