Hi all,
I've got a msi which runs fine on XP, which has a custom action in CostInitialize which starts an attached executable (during uninstall) which detects the process of our application being uninstalled, and sends our process a WM_CLOSE to close gracefully. Works fine on XP, but does not work on Vista. The msi log shows a 1721 error saying that it cannot run the custom action, which is set to ignore exit code, so the installation does not fail, but then the Installer shows the FilesInUse dialog, which is not what I want. This happens also when User Account Control is disabled.
I found one other post which comes very close to what I'm trying to accomplish:
http://www.advancedinstaller.com/forums ... ess#p13043
But the solution given there (build a bootstrap installation executable, with a manifest so that it runs elevated) does not work for me. I need my installation to be an msi, not an exe.
The closest I've come to a solution is to make a custom action (in CostInitialize) which runs a vbs script which uses WMI to loop through the processes and terminates our process. This works, the downside is that is kills the process, does not let it close gracefully, and therefore it leaves our icon in the system tray (our process shows an icon in the system tray, which Windows does not remove when the process dies, it only does this when you "hover" over the icon after the process has been killed).
Is there any other way to accomplish this in a way that it works both on XP and Vista (with or without User Account Control)?
Thanks in advance,
Peter
FOLLOW US
Get the latest news in Application Packaging