How do I run a program automatically when logging into Remote Desktop 2016?

Specify a Program to Start Automatically When a User Logs On Does Not Work in 2016 Server

Archived Forums

>

Remote Desktop Services (Terminal Services)

  • Question

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    By default, Remote Desktop Services sessions provide access to the full Windows desktop, unless a program has been specified to start when the user logs on to the remote session. If an initial starting program has been specified, it will be the only program that the user can use in the Remote Desktop Services session. TheStartmenu and the Windows Desktop are not displayed when the user logs on to the remote session, and when the user exits the program the session is automatically logged off.This feature does not work2016 serverit ignores whatever we specify and always starts a Desktop Session. We are running a work group so group policy is not an option as a workaround.In the 2012 server, 2008 Server it works.Kindly please advise how to get this basic feature to run in Server 2016.

    How do I run a program automatically when logging into Remote Desktop 2016?

    Thursday, December 22, 2016 10:26 PM

Answers

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    3

    Sign in to vote

    Hi,

    On your serverplease create the following registry value:

    HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\

    fQueryUserConfigFromDC REG_DWORD 0x00000001

    After adding the above value, please test to make sure the program starts automatically for each user as you expect it to.

    Thanks.

    -TP

    • Proposed as answer by TP []MVP Monday, February 27, 2017 8:11 PM
    • Marked as answer by TP []MVP Tuesday, March 7, 2017 9:13 PM

    Wednesday, February 15, 2017 6:06 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi, Thank you very much. It now works as expected. Regards

    • Marked as answer by VIrtual Name Friday, August 25, 2017 1:51 PM

    Monday, February 27, 2017 7:45 PM

All replies

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi,

    I have tested for the case.

    In beginning, I tested just like you. Failed.

    Then I configured the setting Run these programs at user logon in LOCAL group policy under the path below. It worked.

    Computer Configuration\Administrative Templates\System\Logon

    Best Regards,

    Jay


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact .

    • Proposed as answer by Jay Gu Friday, December 23, 2016 12:26 PM

    Friday, December 23, 2016 12:26 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Thanks for your reply Jay. Will this setting take away the Desktop Session from the named user and will it actually work per named user or will it be applied to all users logging in? For example will it take away my Administrator Desktop Session? If so would we be able to get back to into our Desktop Session for Administrator. We need to be able to set a different program to start for each named user which is what the environment tab in 2012 and 2008 servers does flawlessly. Kindly let me know. Very much appreciateyou taking the time.

    Friday, December 23, 2016 12:59 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi Jay, Was able to test your suggested solution and found the application does indeed start automatically (similar behaviour to old school startup) however Desktop Sessions are still enabled and the app starts in every named user session. Thanks again for your help we can't use this approach, what we really need is for the environment tab to work in the same way as it does now in 2012 and 2008 Server which hides Desktop Sessions and runs only the program specified automatically when the named user log on. Appreciate your efforts. I guess what we need to know is how to get "Specify a Program to Start Automatically When a User Logs On" so the program will be the only program that the user can use in the connected Remote Desktop Services (RDS) session.

    Sunday, December 25, 2016 3:32 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    3

    Sign in to vote

    Hi,

    On your serverplease create the following registry value:

    HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\

    fQueryUserConfigFromDC REG_DWORD 0x00000001

    After adding the above value, please test to make sure the program starts automatically for each user as you expect it to.

    Thanks.

    -TP

    • Proposed as answer by TP []MVP Monday, February 27, 2017 8:11 PM
    • Marked as answer by TP []MVP Tuesday, March 7, 2017 9:13 PM

    Wednesday, February 15, 2017 6:06 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi, Thank you very much. It now works as expected. Regards

    • Marked as answer by VIrtual Name Friday, August 25, 2017 1:51 PM

    Monday, February 27, 2017 7:45 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi,

    If the reply above has resolved your problem, please mark it as answer.

    Thank you.

    Best Regards,

    Jay


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact .

    Tuesday, February 28, 2017 3:17 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi,

    I have exactly the same issue, I have a standalone Windows 2016 Server and I want when a user connects to the server via RDP (there is only one basically) to start a specific program and not have access to the whole desktop. I have included the above recommendation in the registry but it doesn't work for me!

    Am I missing something here?

    Thank you,

    Theodore

    Friday, August 25, 2017 1:12 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    The above Registry entry worked for me on Server 2016. Our DC is offsite on Server 2008 R2 (don't ask...), and we have several remote-only users who need to have a specific database open when they connect and nothing else. My RDS is on Server 2016 on-site, and by adding the "fQueryUserConfigFromDC" D-WORD as stated above by TP it functions perfectly.

    Thank you for solving yet another MS mystery related to Server 2016. Anyone know why they keep making little tweaks like this that drive us all batty?

    MC

    Tuesday, November 21, 2017 5:32 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    the same thing happen to me it does not work, i think your server has active directory domain service installed.

    Friday, February 1, 2019 10:46 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Thank very much work perfect like i want

    regards

    Wednesday, May 8, 2019 11:05 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    In case anyone else is having the same issue. There are actually 2 registry setting that have to be changed.

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
    Name:fQueryUserConfigFromDC
    Type:Reg_DWORD
    Value:1 (Decimal)

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\\
    Name:fQueryUserConfigFromDC
    Type:Reg_DWORD
    Value:1 (Decimal)


    • Proposed as answer by sabbA risaN Friday, July 12, 2019 6:02 AM

    Friday, June 21, 2019 6:14 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi I am looking for a solution for my environment as below;

    Windows Server 2016 in a work group and no domain controller

    I want to launch an application on the server when the user login (using RDS) without any access to the server.

    Earlier in windows 2008 R2 I was able to create an RDP file and share with the user to launch the application. Now I do not have the option for the server in work group.

    Wednesday, June 26, 2019 9:30 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    excellent and lots of, tons of thanx..

    regards.

    Friday, July 12, 2019 6:03 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi!

    Use Local Group Policy (or you can use Domain Group Policy if server is domain member).

    cmd - gpedit.msc:

    User Configuration - Administrative Templates - Windows Components - Remote Desktop Services - Remote Desktop Session Host - Remote Session Environment - Start a Program

    Tuesday, July 30, 2019 8:39 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Thanks a lot, it works very well.

    Tuesday, February 4, 2020 9:07 AM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    Hi!

    Use Local Group Policy (or you can use Domain Group Policy if server is domain member).

    cmd - gpedit.msc:

    User Configuration - Administrative Templates - Windows Components - Remote Desktop Services - Remote Desktop Session Host - Remote Session Environment - Start a Program

    this works but now even Admin is forced to use this program. How can i get back to the original desktop for Administrator only to make changes?

    Tuesday, April 7, 2020 11:05 PM

  • How do I run a program automatically when logging into Remote Desktop 2016?

    How do I run a program automatically when logging into Remote Desktop 2016?

    0

    Sign in to vote

    For administrators deny the permission of applying this GPO.

    Tuesday, July 14, 2020 6:14 PM

5 Replies

· · ·

How do I run a program automatically when logging into Remote Desktop 2016?

Pure Capsaicin

OP

dbeato

How do I run a program automatically when logging into Remote Desktop 2016?

This person is a verified professional.

Verify your account to enable IT peers to see that you are a professional.

May 20, 2018 at 19:33 UTC

clamaz wrote:

I noted that if I setup a remote desktop client, to start a program after logon, this features doesn't work in 2012/2016 server. Since 2008r2 it worked without problem.

This feature was very useful because you could force a user to start the program they have to use, just after login in the remote desktop server. And when they have finished to use the software, rdp session was disconnected.

How I can do the same with server 2016?

I tried solution to enable this local policy:
Computer Configuration\Administrative Templates\System\logon\Run These Programs at User Logon

Ok, it works, but it affects all users who login into that server. also administrator

I need this feature only fore some users, not all.


Thank you for your support.





What about setting up the application on the Startup folder of the user?

0

· · ·

How do I run a program automatically when logging into Remote Desktop 2016?

Mace

OP

bbigford

How do I run a program automatically when logging into Remote Desktop 2016?

This person is a verified professional.

Verify your account to enable IT peers to see that you are a professional.

May 20, 2018 at 19:56 UTC

Maybe you're approaching the solution wrong.

I'm assuming this is a terminal server using RDS? What is the program? Would you fare better with supporting something like virtualized apps using RemoteApp?

0

· · ·

How do I run a program automatically when logging into Remote Desktop 2016?

Pimiento

OP

clamaz May 20, 2018 at 21:00 UTC

Hi Dbeato, yes it could work if I place a shortucut to the program I would like to start in: C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

but... when the user close program, he still continue to see desktop, and he has to logout manually.
In the "old style" way (since 2008r2) when he close program, also session was disconnected.

0

· · ·

How do I run a program automatically when logging into Remote Desktop 2016?

Pimiento

OP

clamaz May 20, 2018 at 21:08 UTC


BBigford wrote:

Maybe you're approaching the solution wrong.

I'm assuming this is a terminal server using RDS? What is the program? Would you fare better with supporting something like virtualized apps using RemoteApp?

Hi Brandon,

yes this is a windows 2016 server with rds services enabled. Clients are win7/10. Program is a financial software used in this company. Software is not a problem. This issue happens also if I setup rdp client to use Notepad C:\windows\notepad.exe
I think something has changed with 2016, something about security in rdp?
This method works perfectly with 2008r2.


0

· · ·

How do I run a program automatically when logging into Remote Desktop 2016?

Pure Capsaicin

OP

dbeato

How do I run a program automatically when logging into Remote Desktop 2016?

This person is a verified professional.

Verify your account to enable IT peers to see that you are a professional.

May 20, 2018 at 21:57 UTC

clamaz wrote:

Hi Dbeato, yes it could work if I place a shortucut to the program I would like to start in: C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

but... when the user close program, he still continue to see desktop, and he has to logout manually.
In the "old style" way (since 2008r2) when he close program, also session was disconnected.

I understand, Then remote apps is what you need or the new HTML5 RD Web Access.

0

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

Before you begin

Complete these steps as they apply to your remote application configuration:

  • On the remote desktop server, publish or distribute the remote application for end users to access the application remotely. For example, on a Windows server, you must publish an application as a RemoteApp program to ensure that it’s accessible.
  • If you want the remote desktop to start a program that is not listed as a published remote application, on a Windows server, you can modify the remote desktop connection settings of the Group Policy to allow remote users to start any application that is not published or listed as a published remote application.
  • If you plan to enable remote printing, you must configure printer redirection to allow end users to access their local printer in the remote desktop session. On a Windows server, you can configure this setting in the Group Policy or in the client settings of the remote desktop session host configuration.
  • If you plan to enable remote file sharing, you must configure a drive redirection to allow end users to access their local computer in the remote desktop environment. On a Windows server, you can configure this setting in the Group Policy or in the client settings of the remote desktop session host configuration.
  • If you plan to enable copy and paste functionality to and from the remote desktop, you must configure clipboard redirection. On a Windows server, you can configure this setting in the Group Policy or in the client settings of the remote desktop session host configuration.

Note: For instructions on any of these remote desktop operations, see the documentation for your remote desktop server.

In Enterprise Application Access (EAA), you can create a remote desktop application and configure the RDP application with settings that define how end users interact with the remote application environment.

After you deploy a remote desktop application, end users can access the deployed application with the specified external hostname.