Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2019 / AutoStart a Program at RDP Logon in Windows RDS

September 8, 2026

AutoStart a Program at RDP Logon in Windows RDS

In Windows Server 2012 R2 and earlier versions with the Remote Desktop Services (RDS) role installed, you could configure a specific program to run automatically when a user logged into their RDP session by using a setting in the user’s profile. The application (shell) that should be launched instead of the standard Windows Explorer shell (explorer.exe) can be specified in the user’s properties on the Environment tab, using the Start the following program at logon option. When the remote user closes the program, the RDS session is automatically terminated. This approach can be used as a simple alternative to publishing software on RDS as RemoteApps.

RDS: Start the following program at user logon - Environment tab in Active Directory

In Windows Server 2016 and later versions, the option to automatically start a specific program assigned to an RDS user has stopped working and is now disabled by default. Even if you use this profile option to specify an autorun program, it will be ignored, and the user will be logged on to a full remote desktop session.

This is because Microsoft changed the behavior of the Remote Connection Manager (RCM) in Windows Server 2016 and later versions. In the latest versions of Windows Server, when a user logs on, the RCM service no longer retrieves their settings from the domain controller that were previously configured on the Environment and Remote Desktop Services Profile tabs. This includes settings such as the assigned autostart program, roaming profile path, and home folder, all of which are ignored.

These user settings are stored in the userParameters attribute in Active Directory.

Microsoft recommends using Group Policy instead of this option to configure a program to run automatically when a user logs on to an RDP session. To do this, open the GPO editor and navigate to User Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment.

Configure the following options:

  • Start a program on connection = Enabled – specify the full path to the executable file of the program to be run, and its working directory (if required).
  • Always show desktop on connection = Disabled – this prevents the RDS host desktop from being displayed.

GPO option for RDS environment: Start a program on connection

To re-enable querying user configuration and startup program settings during RDP logon through the Environment tab in user properties in Active Directory, revert the host to the legacy RCM behavior. To do this, create the fQueryUserConfigFromDC registry value and set it to 1 in the following two registry keys on the Windows Server host on which the RDS role is installed:

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v fQueryUserConfigFromDC /t REG_DWORD /d 1

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fQueryUserConfigFromDC /t REG_DWORD /d 1

fQueryUserConfigFromDC - re-enable querying user configuration and startup program settings from Active Directory

Then restart the Remote Desktop Services (TermService) service, or reboot the host

If the RD Session Host role is not installed on the host, create the fQueryUserConfigFromDC value under HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server .

Now, if you specify the path to the application’s executable file (or a startup script) in the user’s properties on the Environment tab. The specified program will be launched automatically when the user connects to the RDS server. The user’s RDP session will be terminated automatically if they close the application window.

0 comment
0
Facebook Twitter Google + Pinterest
Questions and AnswersWindows Server 2019Windows Server 2022Windows Server 2025
previous post
How to Convert Windows Machine into a Proxmox VM

Related Reading

How to Assign (Passthrough) a Physical GPU to...

June 11, 2024

How to Use Ansible to Manage Windows Machines

March 12, 2024

How to Create UEFI Bootable USB Drive to...

March 13, 2024

Tracking Printer Usage with Windows Event Viewer Logs

March 12, 2024

How to View and Change BIOS (UEFI) Settings...

September 13, 2023

Install Windows Terminal without the Microsoft Store

March 12, 2024

Change Network Connection (Adapter) Priorities in Windows

August 5, 2024

Fix: Remote Desktop (RDP) Session Freezes (Disconnects) on...

March 18, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • How to Convert Windows Machine into a Proxmox VM

    August 30, 2026
  • Enable or Disable Fast User Switching in Windows 11

    August 18, 2026
  • How to Hide Wi-Fi Network in Windows with WLAN Filters (Blacklist and Whitelist)

    August 14, 2026
  • Invalid Signature Detected: Check Secure Boot Policy [Fix]

    August 5, 2026
  • Windows Installer Service Could Not Be Accessed? How to Fix It

    July 28, 2026
  • Why Windows Reports No Internet Access: How Connectivity Detection Works

    July 26, 2026
  • Inactive TS Ports in Windows: Causes and Fixes

    July 20, 2026
  • Add Wireless Wi-Fi Profiles on Windows Devices via Export/Import or GPO

    July 13, 2026
  • CrowdSec on Windows: From Installation to Threat Blocking

    July 3, 2026
  • Manage Microsoft Store Apps with Store CLI in Windows 11 from Terminal

    July 2, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • Converting Windows 10 to Enterprise LTSC Without Losing Data
  • How to Remove ‘Some Settings are Managed by Your Organization’ on Windows 11 or 10
  • Remove the Max Path Length Limit (260-Characters) on Windows
  • Installing Windows without USB/DVD or Other External Drives
  • How to Pause (Delay) Update Installation on Windows 11 and 10
  • WMIC Command Not Found on Windows
  • How to Add or Delete Fonts in Windows 11/10
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top