Kill 64bit Process During Installation/Uninstallation
SummaryInformation on ending 64bit process
SynopsisThis Knowledge Base article will provide information on how you can have your installation kill a 64 process. Depending on your project type, Basic MSI/InstallScript MSI compared to an InstallScript project, you will have different options available to you.
DiscussionFor an InstallScript project, since the InstallScript engine is a 32bit process, you won't be able to kill a 64bit process directly from your script. The InstallScript engine is only capable of ending another 32-bit process.
So if you want to kill a 64-bit process from InstallScript, you will have to do this externally. Meaning you can either write a 64-bit exe that can be launched from InstallScript using LaunchApplication() and then the 64 bit exe in turn will kill the process in question, or you can still use the LaunchApplication() function to call the Taskkill command line utility on a 64bit machine to kill a 64bit process.
For a Basic MSI or InstallScript MSI project, you can simply add a kill process custom action to your setup to handle ending 64bit processes.
For an InstallScript project, you can take a look at the following Microsoft help document on Taskkill to get more information on how to use it and the command line options it takes.
You can then use the LaunchAppAndWait() InstallScript function to launch the Taskkill command.
LaunchAppAndWait(WINSYSDIR^"cmd.exe", "/c taskkill /F /IM mspaint.exe", LAAW_OPTION_NOWAIT);
For a Basic MSI or InstallScript MSI project type, you can take a look at the following help document Calling a Kill-Process Custom Action for more information on how to add this to your MSI based project.