大网数据广告活动
远程桌面与会话

Remote Desktop session doesn't terminate

· 52CE 我爱测

Resolve an issue where Remote Desktop that specifies a program to start on logon doesn't terminate when the specified program is exited.

This article provides a solution to solve an issue where Remote Desktop that specifies a program to start on logon doesn't terminate when the specified program is exited.

Original KB number:   2513330

Symptoms

A Remote Desktop session that specifies a program to start on logon may not terminate in a timely manner when the specified program is exited. The remote session may appear empty with only a blank background.

This program may be specified under "Start the following program on connection" in RDP client settings or "Start the following program at logon" in Active Directory user properties.

Cause

The specified program may have spawned a new process. As part of the Remote Desktop session termination logic, if the specified program spawns a new process that new process is considered part of the program and the session will not terminate until that process also terminates.

One scenario that meets this criteria is printing from a 32-bit application on a 64-bit Remote Desktop Session Host. This printing action will spawn splwow64.exe, the 32-bit to 64-bit thunking process for spooler. Splwow64.exe has a 3-minute timeout to prevent the process from being repeatedly respawned during heavy printing, so it does not immediately exit when printing is complete. This can cause the remote session to appear "hung" with a blank background.

Resolution

You can add the splwow64.exe process to the following registry key to tell the operating system that the process may be safely terminated automatically:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Sysprocs

Value name: splwow64.exe
Data type: REG_DWORD
Base: Hex
Value data: 0

More information

Terminal Services RemoteApp Session Termination Logic

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。