I am currently trying to do a validation at the uninstall moment. In a Pascal script function, in Inno Setup, I want to search for a specific processes, with a wild card if possible. Then, loop through all find results, get the Image Name and Image Path Name, in order to check if the program that is about to be uninstalled is the same as the one running.
Is there a way to do that?
If not work.Please change as follows.
(old) for I := 0 to High(ProcessList) do
(new) for I := 0 to (GetArrayLength(ProcessList) - 1) do
This is an exemplary task for WMI and its WQL language. Getting list of running processes through WMI is even more reliable than Windows API. The below example shows how to query the
Win32_Process
class with theLIKE
operator: