how to close .exe file in process list in task manager
-
Hi there, I am working on an application that checks the task manager process list and if more than one copy of an .exe file is running, it could close them all and restart it again so that just one copy be running. I could do the part that if one specified application is closing, my program can restart it but I have problem when multiple (the same application) .exe file run sometimes and makes trouble for me. Any help would be appreciated, Regards, Nahitan
-
Hi there, I am working on an application that checks the task manager process list and if more than one copy of an .exe file is running, it could close them all and restart it again so that just one copy be running. I could do the part that if one specified application is closing, my program can restart it but I have problem when multiple (the same application) .exe file run sometimes and makes trouble for me. Any help would be appreciated, Regards, Nahitan
So why not be proactive rather than reactive? In other words, why not just disallow multiple instance to begin with?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi there, I am working on an application that checks the task manager process list and if more than one copy of an .exe file is running, it could close them all and restart it again so that just one copy be running. I could do the part that if one specified application is closing, my program can restart it but I have problem when multiple (the same application) .exe file run sometimes and makes trouble for me. Any help would be appreciated, Regards, Nahitan
And if an application closes all other instances of itself, how could there ever be multiple instances of itself? :)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
Hi there, I am working on an application that checks the task manager process list and if more than one copy of an .exe file is running, it could close them all and restart it again so that just one copy be running. I could do the part that if one specified application is closing, my program can restart it but I have problem when multiple (the same application) .exe file run sometimes and makes trouble for me. Any help would be appreciated, Regards, Nahitan
see ma frnd there are many ways to do that, but what is ur req, one way u can query the process list of system to find the instance, 2nd u can setup a hook to taskman or read the taskman list get the pid and kill it, let me knw, i wil give u the code, i will try not promise
-
And if an application closes all other instances of itself, how could there ever be multiple instances of itself? :)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
the problem is that when customer in some circomstances closes the application by clicking on x, the application looks like to be oppened but it is still running in process list and when they attempt to reopen the appplication, two would be running and so on. the problem is that this just happen sometimes and not all the time. I could not be able to duplicate the problem in my work station and can not understand what really happens. Regards,
-
see ma frnd there are many ways to do that, but what is ur req, one way u can query the process list of system to find the instance, 2nd u can setup a hook to taskman or read the taskman list get the pid and kill it, let me knw, i wil give u the code, i will try not promise
-
Hi there, I am working on an application that checks the task manager process list and if more than one copy of an .exe file is running, it could close them all and restart it again so that just one copy be running. I could do the part that if one specified application is closing, my program can restart it but I have problem when multiple (the same application) .exe file run sometimes and makes trouble for me. Any help would be appreciated, Regards, Nahitan
You said you check for does your program is exist or no I think some days ago I saw a thread on the codeproject about this search on the comments for see this thread.:)
WhiteSky