Environment
Client for Open Enterprise Server 2 SP4 (IR3)
Client for Open Enterprise Server 2 SP4 (IR4)
Situation
When launching a specific application in a Remote Desktop Services session (as described here), upon exiting the application, the expectation is that the session will close automatically. When this problem occurs, though the application closes, the session does not close automatically.
Resolution
Workarond:
Add the NWTRAY,EXE process to the following registry key to tell the operating system that the process may be safely terminated automatically upon exiting the RDP session:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Sysprocs]
Value name: nwtray.exe
Data type: REG_DWORD
Base: Hex
Value data: 0
See Microsoft Article ID: 2513330.
Cause
An instance of NWTRAY.EXE is waiting for EXPLORER.EXE to start (since EXPLORER is what creates the task bar and notification area). But EXPLORER.EXE never does start in the case where a specific application is being launched, so NWTRAY.EXE remains running and waiting when the application is exited.