Archive: Detect if instance of an application is running on uninstall


Detect if instance of an application is running on uninstall
Is there anyway to detect if an application is running if you know that full pathname to it?


This question has been asked millions of times. Please search the forum next time.

FindProcDLL is what you are after.

Stu


No, it doesn't seem to do what I need :-(
I probably didn't explain it very well.

The situation is this: I have two versions of Eclipse installed. Say, for example, they are installed like this:

C:\Eclipse_1\eclipse.exe
C:\Eclipse_2\eclipse.exe

Say, both of these are running. If I write

FindProcDLL::FindProc "C:\Eclipse_2\eclipse.exe"

it returns 0 (which means it hasn't found a process called "C:\Eclipse_2\eclipse.exe").

What I need to be able to kill all Eclipse processes that were launched from "C:\Eclipse_2\eclipse.exe". I am not allowed to killed anything launched from "C:\Eclipse_1\eclipse.exe".

The reason I have to do it this way is that our installer installs some Eclipse plug-ins for the user. The user might well have elected to have several Eclipse installations anyhow, so for our uninstaller, we need to make sure that only the "correct" Eclipse's are killed in order to safely uninstall the plug-ins.

The point is I need to do more than just identify a process by it's .exe name: I need to identify a process by its .exe path including the .exe name!

So either I am going nuts, or FindProcDLL doesn't do what I need it to!


You can use the LockedList plug-in for this. You can give it executable names for modules. It will only work on Windows NT4 and above though.

Stu