Older Windows Server versions could start a selected program at RDP logon through the user’s Environment properties. On Windows Server 2016 and later, that profile-based method is ignored by default because the Remote Connection Manager no longer queries the same user configuration from the domain controller. Use Group Policy for a new configuration, or restore legacy behavior only when compatibility requires it.
What changed in newer versions
Previously, Start the following program at logon could replace the normal Explorer shell for an RDS user. Closing that program ended the user’s session. On newer servers, settings stored in the Environment and Remote Desktop Services Profile tabs—including the startup program, roaming profile path, and home folder—are not retrieved by the default RCM behavior.
Configure the startup program with Group Policy
- Open the GPO editor for a policy that applies to the RDS host or its users.
- Go to User Configuration > Policies > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment.
- Set Start a program on connection to Enabled.
- Enter the program’s full executable path and, when required, its working directory.
- Set Always show desktop on connection to Disabled if the full desktop should not be displayed.
Test the executable path and access requirements in a controlled account before applying the policy broadly. The program must be available to the user in the RDS session.
Validate the result
- Connect to the RDS host with a test account.
- Confirm that the configured program starts when the RDP connection is established.
- Check that the desktop is not displayed when the corresponding policy is disabled.
- If the policy has no visible effect, verify its scope and whether it has been applied to the intended user or host.
If the application does not start, recheck the full path, user access, and possible conflicting session policies. Keep testing separate from production users because closing the configured application can terminate the RDS session.
Restore legacy user-profile querying
When compatibility with the Environment tab is required, create a REG_DWORD value named fQueryUserConfigFromDC with data 1 in both locations below:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal ServicesAfter creating the values, restart the Remote Desktop Services service, TermService, or reboot the host. Then specify the executable path or startup script in the user’s Environment properties and test a new RDP connection.
Operational guidance
The registry setting restores legacy behavior; it is not the primary configuration path for newer deployments. Group Policy is the clearer centralized option and avoids relying on profile settings that the default RCM behavior does not read. Document the selected method and validate the session lifecycle before rollout.
Practical takeaway
For Windows Server 2016 and later, start with Start a program on connection under Remote Session Environment, disable desktop display when appropriate, and verify the result with a test account. Use fQueryUserConfigFromDC only when the older Environment-based configuration must be retained.
