The situation is that I want to allow users to open multiple instances of the program but I do not want more than one logged on user to use the program at once. So, for instance if the program is installed on a server and multiple users can Remote Desktop to the server I only want one user to be able to run the program but still be able to run multiple instances. I have looked into using a mutex but from what I’ve found a mutex would only allow one instance of the program. Is this something that is possible with C#?
Share
I would use a named Mutex. Inside of its protection, keep a record of the current logged on user. If one exists, and it’s not the current user, then exit – otherwise, record that the current user is running the application.