Inno setup kill process before install

broken image
broken image

If you want it to run at the beginning of the install process, you can schedule it before 'Wizard Dialogs Stage' ->'Searches'. This custom action can be added at any point in the installation. Offers no benefits in my case, I just want to execute taskkill before installing a particular file.ĭetect if a process is running You can detect if a process is running by using a 'Detect Process' predefined custom action. What is the best way to kill the process using taskkill before install? Please note that I specifically want to kill the process. I already found out: Filename: 'taskkill' Parameters: '/im 'My Service.exe' /f' Flags: runhidden The section, however, runs after install, so I can't use it for that.

broken image
broken image

I install a service/daemon, which needs to be killed before uninstall and reinstall. If set to yes or force and Setup is not running silently, Setup will pause on the Preparing to Install wizard page if it detects.