4

I have Windows Server 2008R2 with Remote Desktop Services. I need certain program started on every connection, within normal remote desktop environment.

I tried this group policy: "Local Group Policy" ==> "Computer Configuration" ==> "Administrative Templates" ==> "Windows Components" ==> "Remote Desktop Services" ==> "Remote Desktop Session Host" ==> "Remote Session Environment" ==> "Start a program on connection"

Problem is, it replaces desktop environment with a single program: there is no task bar, no start menu, and when user quits the program, session ends.

I need a program to be started within normal desktop environment, just like "Start Menu ==> Programs ==> StartUp", but for every successive connection, not just initial one.

I don't mind hacky solution, I just need to get it done.

3
  • Is the program on your computer of the Client Pc/Remote desktop? Commented May 6, 2016 at 7:37
  • Program is located on the remote desktop session host. User can start it manually by double-clicking shortcut on the remote desktop after logging in, but it needs to be started without user interaction, on every connection.
    – Sergei
    Commented May 6, 2016 at 7:42
  • superuser.com/questions/660552/… (although reg edit option isn't ususally a good one)
    – Dave
    Commented May 6, 2016 at 8:19

1 Answer 1

4

Use Task Scheduler.

Set it up on each computer or remote desktop.

First start Task Scheduler.

Name it and put a description if you would like.

enter image description here

Next click Triggers. Here you will select what you want to start the program in this case you want the program to start at logon.

Or as in Your case you figures out "Connection from remote computer" will work in place of the logon.

Here you can select at any logon or setup certain accounts that logon.

enter image description here

Next you select your program. Place your program path. As well as the start Dir.

enter image description here

Now when ever you connect via Remote Desktop you will have the desktop environment as well as the program you want to start when you login.

4
  • This is just what I need. Thank you very much! Correct trigger for my case is "On connection to user session", "Connection from remote computer".
    – Sergei
    Commented May 6, 2016 at 8:49
  • I will add that in. Thank you and you are welcome. Commented May 6, 2016 at 8:52
  • 1
    I'd like to add that it's not necessary to set up separate task for every user, it's possible to set "use the following user account" to group "Users" and have it work for everyone.
    – Sergei
    Commented Aug 10, 2017 at 9:56
  • It's unfortunate we can't pass args into the connection to selectively run a program automatically instead of all the time Commented May 24 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .