So, I have a custom action which I had nothing but trouble with before, because the installer was trying to call it with the wrong privs. Finally, I was instructed to change the custom action from a "Launch EXE with working directory" to a "Launch File" and that seemed to fix the issue. It works great on my Win7 x86 VM. However, it seems to hang everywhere else it runs. The only thing this custom action is trying to achieve is to run an uninst.exe I have on disk.
So, the uninstall is initiated from Windows "Programs and Features" in control panel. Just right click on the product and select uninstall.
So, the hang appears to happen before uninst.exe is even launched? I say that because the uninst.exe is a nsis generated exe and no log is generated. The very first thing in the nsis Uninstall section is this:
nsislog::log "Uninstall starting for version ${MajorVersion}.${MinorVersion}.${PatchVersion}.${BuildRevision}"
So, I suspect that is never hit?
The only thing the uninst.exe does is stop one user-mode service, stops two kernel driver services, removes the registry entries for everything related to the product, and removes all disk artifacts related to the product.
What is interesting is, if I stop the user-mode service and stop the two drivers before I attempt to uninstall the product then the uninstall works fine. So, I am mystified by a couple of things: 1) If stopping those services makes a difference, I would think that uninst.exe is the cause of the hang, but then I would expect log output, which I get if the uninstall doesn't hang 2) What would the installer be doing that would cause the uninst.exe to hang if it was uninst.exe? Does the installer have a handle open to the service control manager or something that blocks anything else? 3) All of the data I see so far says this has nothing to do with my uninst.exe and so why would services running or not affect the installer running my custom action?
Also, I tried changing my uninstall custom action "Execution Time" to deferred, commit, all four options in different tests, and it made no difference.
Any help would be greatly appreciated on this. I am attaching my .aip project and logs for working (because I shut down the services manually before starting the uninstall) and non-working (hang) cases.
To get the logs, I started the uninstall using a command-line with msiexec.exe and the '/x' option.
FOLLOW US
Get the latest news in Application Packaging