Archive: How to kill right process


How to kill right process
HI
I am running a NSIS installer but having a problem with the uninstall. The app that I am installing calls a exe file when the application is running creating a process in windows task manager, when the applicationn is closed this exe remains in the windows process list. I can kill it using the FindProc and KIllPRoc functions. The problem is that another application could also be using another instance of the same exe process. Could anyone tell me is there any way of identifying which exe process was spawned by my application and killing that process only. I would be grateful if anyone could help me with ideas or if they have done this before explain how it can be done if it is possable.
:confused:


You need a plug-in. http://www.codeproject.com/threads/ParentPID.asp uses one of possible ways to get parent PID, but included code may not work on all OS'es. Google search may help (or may not). For process termination use NSIS plug-ins sources http://nsis.sourceforge.net/Category:Plugins


Takhir

thank you for the reply I will have a look at this

Nigel