How to run a program in another user's terminal server (RDS) session

1

When I search this I mostly get results like "run a command as a different user" which is not what I'm looking for. I want to do something like psexec or runas, but not limited to that, but the point is for the program I run to run in the other user's session. I will not know their credentials.

In this specific case I am trying to run a script to reset the windows positions of a multi-window application that they are running in their own RDP session. They are running the app in seamless mode and have no way to go to a start menu or command prompt. I would use /shadow but since the application is seamless it gives me no more access to the start menu or command prompt that what the user has, which is none. I have the script set up as a remoteapp that normally works and the user can run it as a separate RDP connection, which will automatically connect to their active session so it acts on the other application running in that session, but sometimes it doesn't work.

I am really looking for a way to invoke a command within another user's RDP session which I could use for the case I described and maybe other situations in the future.

tmcdonald59

Posted 2019-10-25T13:22:11.657

Reputation: 11

What about a login script? – Robert – 2019-10-25T13:26:03.413

Thank you for the suggestion. It was a good one for the example I gave. I will clarify my question. – tmcdonald59 – 2019-10-25T21:19:14.990

No answers