Windows 2012 R2 – RemoteApp – limit user instances

remoteappwindows-server-2012-r2

We have a new ERP application which runs via RemoteApp. It's expensive and has a very draconian license limit. Sometimes users will mistakenly open multiple instances of it, when they are not supposed to.

However, no matter how many copies of the application a user may be running, they all run in the same user session. So, limiting the number of RDP sessions will not do the trick.

We need to limit the number of active sessions of that application that a user can use. Is there a way to do this within RemoteApp? Or, should I be looking into AppLocker?

Thanks in advance.

Best Answer

I don't think there is any built-in way to do this with RemoteApp yet. There are 3rd party tools that can likely do this (AppSense, etC).

You could also look at launching the application via a script that checks if the process is running within the user context and, if not, launches the application (or kills the other process first before launching).

A similar script was provided as an answer to this super user question
edit: and updated to include an additional filter to filter to search based on the username environment variable.

tasklist /nh /fi "imagename eq notepad.exe"/fi "username eq %userdomain%\%username%" | find /i "notepad.exe" > nul || (start notepad.exe)