End process before attempting to copy files
1 answer
If your application has a window with a unique class name, you can simply send it to WM_CLOSE / WM_QUIT or whatever message you like.
Or your application can register a local server COM object that the uninstaller can invoke (a system plugin can invoke COM methods)
Another way to do this is a program to create a named event and wait on it, the uninstaller will signal this, this will be the key to shutting down the program.
As a last resort, you can kill a process with one of several plugins: KillProcDLL , Process Plugins , KillProc Plugin, and NsProcess
Also, the Locked List plugin might be a more suitable alternative .
+1
a source to share