Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


How to limit the no. of opened instances of application to 5?

How to limit the no. of opened instances of application to 5?

How to limit the no. of opened instances of application to 5?

Users go on opening as many instances of application as suit to them. Many time the number of instances per user exceed 10 and sometimes it even touches 20.
My question is that "How can I limit the no. of individual instance of application to maximum 7, over which if they try to open more instances the least used instance (or any such logic) will be closed automatically opening the new instance and hence the total no. remains equal to 7?"

RE: How to limit the no. of opened instances of application to 5?

Take a look at one of the many FAQs only allowing a single instance and extend it to count instances to stop at 7 rather than at just 2.

FAQ184-2442: one instance of program without use of WINDOW TITLE
FAQ184-1767: Only one instance of an application
FAQ184-1998: Having only one instance of App, bring window to top
FAQ184-839: How to ensure that only one instance of my application is running in my desktop.
FAQ184-6206: Ensuring only one instance of an app using WMI

Notice in a terminal server (I guess you are still concerned with your terminal server application) every session may see processes of himself and other users, too, especially via WMI, so you have to take the user into account before judging too many instances open, but most likely WMI will tell you that as property of a process and thus WMI would best fit your needs.

Also notice: If your 15 users (persons/employees) each start applications multiple times, the 1GB memory reservation I suggested should be split into perhaps "only" 125MB for each process. You always should not think in number of users, but the number of processes. You may add in some of the GB I decided to give the OS. Anyway, your real memory usage might be lower than 100MB, perhaps even lower than 50MB, VFP already worked in times, 1MB was the RAM of a PC, or even less. Logging the memory consumption of SYS(1016) can give you a good estimate of what a process really needs if you give it 1GB via SYS(3054) and then you can reduce to perhaps double of that.

Bye, Olaf.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close