The installer successfully installs a Windows Service and a sys tray application in the APPDIR folder. However, the Windows Service later downloads and runs another application, Dynamic.exe, inside the same APPDIR folder so that if I try to uninstall, it won't be able to delete all the files in the APPDIR folder, since the uninstaller is unaware of the all things running in that folder.
Perhaps there's a way in Advanced Installer to automatically kill any process whose MainModule path is inside APPDIR. I assumed no, so I wrote a simple custom action (a LaunchExeWithDirectory) that I placed in the uninstall sequence right after Paths Resolution and before Preparing. It runs the Dynamic.exe with the command option -uninstall, and I've tested that manually and it kills all the other processes running in APPDIR and then exits itself. However, when I do the uninstall, it never runs that custom action. If I check "Fail installation if custom action returns an error", the uninstall will fail, and the event viewer will show:
Product: MyProduct -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: LaunchExeWithDirectory, location: C:\Program Files (x86)\MyProduct\MyProduct\, command: "Dynamic.exe" -uninstall
That's the correct location and name of the exe the custom action refers to, but it's simply not running. Could it be that it doesn't even try running this exe (even though the file exists) because it wasn't installed directly by the installer?
This is using Advanced Installer Professional 11.9 build 63002 and the test target machine was Windows 10 Home.
FOLLOW US
Get the latest news in Application Packaging