Recently a UK TRM customer posed  a question to their TRM:

“I need to limit our users to running two instances of a particular application.  How can I do this?”

There was quite a bit of head-scratching in the team about how to do this…

  • load evaluator?
  • some sort of policy?
  • Could the option to limit users to 1 instance of the application be adjusted to limit a user to 2 instances?

So the obvious candidate is the published application setting to limit a user a single instance of the application; here is a screenshot of this option taken from XenApp 6.5:

Wouldn’t it be great if there was a UI option to set a flexible per-user limit for a published application?  Sadly there doesn’t seem to be such an option, even “under the covers”.

The customer’s desire to limit the application to two instances per user was due to the resource consumption of the application, which needed to be kept in check for the benefit of the wider user community.  However, this needed to balanced against the flexibility the user community needed to run multiple instances of the application.  To simplify administration the customer did not want to stand up a separate silo of XenApp servers just for this application.

Based on these requirements we had several suggestions for the customer:

1. Custom Script

Write a script that checks for the presence of the executable in question, and if two instances are already running for the requesting user, prevent further instances from launching.   Publish the script to the users rather than the native application.

2. Publish twice

Publish the application executable twice, and use the “allow only one instance of the application for each user”.

I am interested to know if anyone else has had this business or technical requirement and how they have handled it.  Are there third-party products that could do this?  What do you think?