Uninstall hangs - Advanced Installer Community
bmckenzie
Posts: 15
Joined: Thu Nov 17, 2016 1:08 am

Uninstall hangs

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.
Attachments
client_gpo_wrapper.aip
(13.71 KiB) Downloaded 255 times
msi_uninst_work.log
(157.8 KiB) Downloaded 241 times
msi_uninst_hang.log
(25.98 KiB) Downloaded 233 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Uninstall hangs

Hello,

I'm afraid we didn't find any useful info in the sent log files which could reveal the hang reason. Could you send us a download link of the setup package built with Advanced Installer and also of the old setup package you are trying to remove during the main product removal to support at advancedinstaller dot com so we can test and investigate this on our side?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bmckenzie
Posts: 15
Joined: Thu Nov 17, 2016 1:08 am

Re: Uninstall hangs

I found the problem, it was a 3rd party application with a deadlock problem that hosed msiexec.exe. Thanks!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Uninstall hangs

You're always welcome.

Thank you for your follow up.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”