Archive: Differntiating between Application and Installer with the same process name


Differntiating between Application and Installer with the same process name
Hey guys,
I'm trying to close an application if it is running while the installer is running, but the problem is that the application has the same process name as the installer.

How can I find which is which to close the application properly?


well, if you look for a window, you can compare class names or compare with $hwndparent


Good suggestions.

I tried, but the class name is too generic to rely on and the window title shares the first two words of the installer title and the final word is different based on the locale.

For instance:

Company AppName Setup (Installer, with Setup localized and re-arranged based on locale)
Company AppName Trial (Trial is localized in four languages)
Company AppName (Registered Version of App)



Thoughts?


I don't recall right, isn't there like a RegEx plugin for nsis? You can use it to detect "Setup", "Trial" or non in the given window titles.


If you call GetWindowThreadProcessId with the system plugin, passing in $hwndparent, you know which process/PID not to kill


Using the LockedList plug-in is your safest answer.

Stu