Just to clarify: there is apparently no way within the RemoteApp configuration to prevent a user from running two instances and therefore running the application twice--simply by minimizing one and then opening another instance. It seems this must be built into the application itself. Since I am not the application developer, all I can do is go back to them and ask that they check to see if the user has an instance open before allowing another.
Prevent user from having two instances of RemoteApp
Server 2019
Is there a way to prevent a user from opening multiple instances of a RemoteApp? I already have the GPO set to "Restrict Remote Desktop users to a single Remote Desktop Services session", but that is an entirely different question of whether they can open multiple instances of the RemoteApp--that all run within the same user's session.
Users regularly forget that they have a RemoteApp open and double-click the RDP file to open a new one. This ends up consuming two licenses for the application until the user closes each instance. I have a Windows 2008 server also running a RemoteApp, and it correctly takes over the first session if the user attempts to spawn a second instance of the RemoteApp.
So I figure I missed something in the configuration of my Server 2019 RDApp.
2 additional answers
Sort by: Most helpful
-
Grace HE 1,246 Reputation points
2021-03-23T07:34:50.047+00:00 Hi,
Thank you for posting your query. According to your description, here are some hints you may try to solve this.
Mutexes
https://learn.microsoft.com/en-us/dotnet/standard/threading/mutexesWhen creating the mutex you would use the naming convention Global\MutexName to handle terminal services scenarios.
// declare in your program
private static Mutex mutex = null;bool createdNew;
mutex = new Mutex(true, "Global\MutexName", out createdNew);if (!createdNew)
{
// Application is already running, so shutdown
Application.Current.Shutdown();
}Best Regards,
Grace---If the suggestions above are helpful, please ACCEPT ANSWER. Really appreciate. This will also help others with similar issue to find this post quickly. ---
-
Brian Hart 296 Reputation points
2021-03-24T00:58:13.453+00:00 I am not the application developer, so I will go back to the application developers to ask them if they can block multiple copies per workstation. I was just hoping that the Remote Desktop App could be configured to allow only the requested application and only one instance within the session.