×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 332356, Entry date: 10/01/2013
(5)
Rate

With Windows Server 2000/2003, Windows 2000 Professional, Windows XP Professional and Windows Vista, what should you do if disabling the key combinations is ineffective in WinCC?

  • Entry
  • Associated product(s)

Description
There are several situations where disabling the usual Windows key combinations is ineffective. In this entry we show you what to do to make disabling the key combinations effective. The "AlmXpmgr.exe" process must be active in the Windows Task Manager for disabling the key combinations.

You have two options for starting "AlmXpmgr.exe".

  1. Start "AlmXpmgr.exe" in the startup list of the computer that belongs to your WinCC project.
  2. Start "AlmXpmgr.exe" in the startup list of the computer that belongs to your WinCC project.

Note
Set Windows 7 or Windows Server 2008 as the operating system and follow the instructions given in Entry ID 44027453 to disable key combinations effectively.

We are dealing with the situations below.

  1. What should you do if disabling the key combinations is ineffective in WinCC?
  2. How can you have event-triggered disabling/enabling of Windows key combinations at Runtime?
  3. How do you disable typical Windows key combinations in WinCC?

1. What should you do if disabling the key combinations is ineffective in WinCC?

Instructions
Proceed as follows.
 

No. Procedure
1 Create a new project (do not define any other settings)
2 Close WinCC
3 Start WinCC (new project)
4 Start Runtime without graphics
5 End Runtime
6 Close WinCC
7 Start WinCC
8 Open the original project again
9 Start Runtime
Table 01

If this procedure does not work, please check the following registry entries.
 

No. Procedure
1 "Start > Run...", enter "regedit".
2 Search for the code:
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/Current Version/Winlogon
3 Check whether the following entries are present:
GinaDLL = "almxgina.dll" and
Userinit = "userinit,ALMXPMGR.EXE,nddeagnt.exe"
The keys will only be disabled properly if these two entries are present.
Table 02

You can then check whether the keys have actually been disabled.
 

No. Procedure
1 "Start > Run...", enter "regedit".
2 Search for the code:
HKEY_LOCAL_MACHINE/SOFTWARE/SIEMENS/WinCC/WinLogon/Permissions
3 All the available key combinations are entered in this path.
Below is a figure with the registration of all the available key combinations.


Fig. 01

If the values of the desired key combinations are set to "0", then the key combinations concerned have no function.
Proceed as follows to enable the time synchronization:
 - Select the name of the desired key combination.
 - Right-click and select "Change".
 - Change the value from "0" to "1".
 - Then click "OK".

Table 03

IMPORTANT
As a general rule, no warranty can be provided for direct changes made to the Registry, because this is the sole responsibility of the user. In any event, you are advised to make a backup of the registry before undertaking the actions described here. Furthermore, these settings are computer-specific.  This means that when you copy the project to another computer, you must make the settings again.

2. How can you have event-triggered disabling/enabling of Windows key combinations at Runtime?

Instructions
In the WinCC Explorer you can disable/enable Windows key combinations selected in the "Parameters" tab of the "Computer properties" dialog.

Changes to the settings in the "Computer properties" dialog only become effective after restarting the Runtime. Below we describe how you can enable/disable a number of Windows key combinations at Runtime. This method takes into account the authorization levels of the WinCC User Administrator.

The C function "SetXGinaValue()" is used. This function is provided with the DLL "ALMXGINA.DLL".
 

Function BOOL SetXGinaValue(unsigned int uiKey, BOOL *pbEnable, DWORD dwSize);
Function The function disables/enables a Windows key combination specified by "uiKey". The information as to whether the key combination is disabled or enabled is transferred as a pointer in the "pbEnable" parameter.
Return The function returns the value TRUE or FALSE.
Example If the "pbEnable" parameter is not a pointer to a tag of the "BOOL" or "DWORD" (32-bit) type, then the function does not run properly. The specified key combination is not disabled/enabled. In this case, the function returns the value "FALSE".
Parameter
  • uiKey (unsigned int)
    With the "uiKey" parameter you define which key combination is to be disabled/enabled. You can use the following constants:

    #define XGINA_ALLOW_SHUTDOWN    1

    #define XGINA_ALLOW_LOGOUT           2

    #define XGINA_ALLOW_CTRL_ALT_DEL 3

    //Windows Key+E, /Windows Key+R
    #define XGINA_ALLOW_CTRL_ESC          4 

    #define XGINA_ALLOW_ALT_ESC          5

    #define XGINA_ALLOW_ALT_TAB          6

    Note
    The disabling/enabling of key combination CTRL+ESC simultaneously controls disabling/enabling of the Windows key (for example, Windows key+E for calling the Windows Explorer or Windows key+R to execute a program).
     
  • pbEnable (BOOL*)
    The "pbEnable" parameter is the address of a tag of the BOOL or DWORD type that contains the information whether the key combination specified in the "uiKey" parameter is to be disabled or enabled. If the tag to which the "pbEnable" pointer points contains the value "TRUE", then the key combination specified is enabled, otherwise disabled.
     
  • dwSize (DWORD)
    In the "dwSize" parameter you specify the size in bytes of the tag to which the "pbEnable" pointer points.
Table 04

Note on WinCC V7.0 SP3 Update 3
As from Update 3 for WinCC V7.0 SP3, when key combinations are disabled, always all the function keys for access to the operating system are disabled.
This includes the key combinations below:
 

<Strg+Alt+Entf> / <Ctrl+Alt+Del> <Strg+Alt+Tab> / <Ctrl+Alt+Tab> (Windows 7)
<Alt+Esc> <Alt+Umschalt+Esc> / <Alt+Shift+Esc>
<Alt+Tab> <Alt+Umschalt+Esc> / <Alt+Shift+Esc>
<Strg+Tab> / <Ctrl+Tab> <Strg+Umschalt+Tab> / <Ctrl+Shift+Tab>
<Strg+Alt+Esc> / <Ctrl+Alt+Esc> <Strg+Alt+Umschalt+Esc> / <Ctrl+Alt+Shift+Esc>
<Strg+Esc> / <Ctrl+Esc> <Strg+Umschalt+Esc> / <Ctrl+Shift+Esc>
Win95 links /Win95 left Win95 rechts / Win95 right
Table 05

Proceed as follows to activate key disabling.

  1. Activate disabling of <Ctrl+Alt+Del>.
  2. In order to avoid conflicts, disable all the other options for disabling key combinations.

This information and Update 3 for WinCC V7.0 SP3 are available in Entry ID: 63472422.

Valid up to WinCC V7.0 SP3 Update2
The following download provides a C action that enables/disables the Windows key combinations in accordance with the authorization level of the user currently logged on.

WinCC_SetXGinaValue_c.txt ( 1 KB )

Valid as from WinCC V7.0 SP3 Update3
The following download provides a C action that enables/disables the Windows key combinations in accordance with the authorization level of the user currently logged on.

WinCC_SetXGinaValue_c_new.txt ( 484 bytes )

Note for migrated projects
The following settings must be made in the Registry for migrated projects.
 

No. Procedure
1 "Start > Run...", enter "regedit".
2 Search for the code:
HKEY_LOCAL_MACHINE/SOFTWARE/SIEMENS/WinCC/WinLogon/Permissions
3 All the available key combinations are entered in this path.


Fig. 01

The entries below must have the value "1" set:

  • AllowAltEsc
  • AllowAltTab
  • AllowCtlEsc
  • AllowLogout
  • AllowShutdown
Table 06  

Notes on downloading
In this example, the user-specific authorization "Operating System" was created with the number 19 for enabling the Windows key combinations.
You can also use another or existing authorization (for example, "Higher process controlling", number 6).


Fig. 02: Assignment of authorizations in the WinCC User Administrator

In order to enable/disable the key combinations when a user logs on/off, you can use the C script provided with this entry in a global C action. As trigger you can use the internal tag "@Current_User" created by the system.

3. How do you disable typical Windows key combinations in WinCC?

Instructions
You can disable the key combinations "Ctrl + Alt + DEL", "Alt + TAB", "Ctrl + ESC" and "Alt + ESC" in the Properties dialog for each computer in the WinCC Explorer by going to "WinCC Explorer > Computer > Computer properties > Parameters" and selecting the appropriate option box.

 
Fig. 03: Settings for disabling/enabling Windows key combinations

The key combination "Alt + F4" can be disabled in the "Properties" dialog for each computer configured in the WinCC Explorer. Go to "WinCC Explorer > Computer > Computer properties > Graphics Runtime" and select the appropriate option box.


Fig. 04: Settings for disabling/enabling "Alt+F4"

In order to make sure that the Windows taskbar is not displayed during WinCC Runtime also when you call independent applications (for example "Screen selection by name", "Screen selection by measuring point", "User Authorization" or "SFC Visualization"), you should make the following settings in the "Taskbar and Start Menu Properties" dialog. The option box "Keep the taskbar on top of other windows" must be deselected.


Fig. 05: Settings dialog for the Windows taskbar

Note
The screenshots were made with WinCC V7.0 and Windows XP. There might be slights differences with WinCC V7.2 and Windows 7.

Important
This entry contains information for editing the Registry. You should make a backup copy of the Registry before editing it. More information about making a backup copy, restoring and editing the registry is available in the Microsoft Knowledge Base in Entry ID 256986. Incorrect use of the Registry editor can cause serious problems that affect the complete system and make it necessary to reinstall the operating system. You use the registry editor at your own risk.

Additional Keywords
27068495, 22326881, Disable keys, Deactivate keys, Key function, Special keys, Lock keys, Kiosk mode

Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.