2

I am on a Windows Server 2008 R2. Is it possible to limit the number of concurrent instances of a program/an executable file for a user?

An example: I would like to prevent the users from starting paint.exe if another paint.exe is still running.

3 Answers 3

1

I'm pretty sure the program would need to have this sort of checking built inside itself for this to work. Or then you need to build a custom program launcher script or similar which checks the process list before starting the program.

AppLocker comes close, but even with AppLocker policies you can't do quite what you're after.

1
  • I already looked at AppLocker, but you are right, it does not work with it. Maybe I could write a simple service with C# that checks frequently for a user that has multuple instances running.
    – Heinrich
    Nov 30, 2011 at 14:02
1

I ended up writing a windows service in C# that frequently checks for multiple opened instances and terminates the latter started.

3
  • Sounds like a useful open-source project in the making.
    – Skyhawk
    Dec 6, 2011 at 15:55
  • You are right. I need to check with our MD if its possible to make it OS. I will post the link here.
    – Heinrich
    Dec 6, 2011 at 15:56
  • Fun. So I could block an important product running by creating a very simple program that does nothing and never closes, and set it to run automatically as a service.
    – Joel Coel
    12 hours ago
-2

No, it is not possible, and it rarely makes sense to start with. I have such a program here (Turbo Floorplan) and it sucks - like when I try to replicate a building plan. Can not open 2 documents at the same time.

2
  • That would certainly suck in the use case you mentioned, but there are lots of other types of programs for which having multiple instances open at once would create all kinds of havoc, and as such it'd be perfectly reasonable to prevent additional instances from running. Paint.exe is not a good example of a case where it makes sense.
    – JakeRobb
    Dec 1 at 18:26
  • Agreed. Then the programmers of those programs should be smart enough to limit their start - it is not like this inot more than a trivial code amount at startup.
    – TomTom
    Dec 1 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .