I want to detect if theres a duplicate process is running, for example notepad, if there are more than 1 notepads open, it will detect that and then close all the notepads. Well its not on notepads, its for a program. I just used notepads as an example.
Asked
Active
Viewed 410 times
0
-
What is the use case of this? It really doesn't sound like something you'd want, considering, especially on windows, system processes/services are ran under scvhost name. Killing them could cause a lot of problems. – Aug 04 '19 at 09:30
-
Do you want to restrict your own program, or should your program restrict another one? What do you consider duplicates - same process name, same executable, same service? – MisterMiyagi Aug 04 '19 at 09:40
-
2Possible duplicate of [Check to see if python script is running](https://stackoverflow.com/questions/788411/check-to-see-if-python-script-is-running) – Giulio Caccin Aug 04 '19 at 09:54