Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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.

share|improve this answer
    
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 '11 at 14:02
up vote 1 down vote accepted

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

share|improve this answer
    
Sounds like a useful open-source project in the making. –  Skyhawk Dec 6 '11 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 '11 at 15:56

No, it is not possible and it rarely makes sense to star with. I have such a program here (turbo floorplan) sucks - like hell when I try to replicate a bnuilding plan. Can not open 2 diocuments at the same time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.