How to end a process using inno setup?

Nithin picture Nithin · Oct 27, 2011 · Viewed 12.9k times · Source

I want to kill a process using inno setup.i want to check whether the window is open before i start installing the setup.

can i do this by searching windows name? please help me with some sample code to kill the process

Answer

jrm picture jrm · Sep 2, 2014

in the [UninstallRun] section, you can add the following code:

Filename: {sys}\taskkill.exe; Parameters: "/f /im MyProcess.exe"; Flags: skipifdoesntexist runhidden