Application removal successful, but fails according to Software Center

Hi,

I have tried to make both Firefox and Notepad++ available to my test users. Both applications install fine and are detected as being installed. The issue I am facing is that when the user tries to uninstall the application, Software Center informs that the removal failed with error code 0x87D00325. Both applications have actually been uninstalled and as soon as I manually run the "Application Deployment Evaluation Cycle", the application is shown as being available.

So basically it would seem that the application is being detected after it has been uninstalled.

For example in my Detection Rule for Notepad++, I am checking the registry for HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++\DisplayVersion = 6.1.8. The issue seems however to remain, no matter if I check the registry or the filesystem.

Does anyone know how to fix this?

Regards, Carl

October 9th, 2012 9:47am

Do you know if the uninstaller for these applications returns an exitcode of 0 (zero) when they finish?  I've seen many uninstall routines exit with some crazy return codes even when all has gone OK.

Andy

Free Windows Admin Tool Kit Click here and download it now
October 9th, 2012 10:03am

Check AppEnforce.log and AppDiscovery.log.
October 9th, 2012 10:18am

I checked the AppEnforce.log file and it states that both uninstallers return exitcode 0. I have only had this issue with applications that use a uninstaller that is located in the install directory, for example Notepad++ uses C:\Program Files\Notepad++\uninstall.exe.

Regards, Carl

Free Windows Admin Tool Kit Click here and download it now
October 9th, 2012 10:34am

This is a known "issue" of sorts. The problem is that the uninstaller for Notepad++ (and other exe based installers) actually launches a second process to perform the uninstallation. Thus, the actual exe that ConfigMgr kicks off to perform the uninstall exits while this this other exe continues on uninstalling the app. Because Notepad++ is so small, you don't really see this happening. However, the end result is that ConfigMgr thinks the process of uninstalling is done because the command-line it ran finished so it evaluates the app condition before the actual second exe, which is the actually performing the install, is finished and the condition evaluates to false.

This isn't really a ConfigMgr issue although it is a known issue and they are considering adding a configurable time delay to the eval process.

The recommended work-around is to include a simple batch file in your source file directory that runs the exe uninstaller and then pauses for a "few" seconds which allows the spawned exe to finish. You specify this batch file (with the pause) as your uninstaller.

I've been meaning to blog about this as a follow-up to one of my other posts when I discovered this behavior also and filed a DCR: http://blog.configmgrftw.com/?p=4

October 9th, 2012 2:02pm

Thank you very much for your answer. I did assume based on the logs that the issue was with the Detection running a bit too quickly. A configurable delay sounds like a great idea, hope they implement that in SP1.

I will go with your suggestion of using a batch file.

Free Windows Admin Tool Kit Click here and download it now
October 9th, 2012 2:59pm

Nope not in SP1 to my knowledge. Since this isn't really a ConfigMgr issue and there is a good and simple work-around, they have much bigger things to fix.

October 9th, 2012 3:01pm

Hi,

I am currently trying to solve the "Removal Failed" message when trying to uninstall Notepad++. I tried lots of things, also your above solution and created this batch file:

"%ProgramFiles%\Notepad++\uninstall.exe" /S
SLEEP 10

Unfortunately this did not work.
Can you provide me the exact batch file for unstalling notepad without receiving the "Removal Failed" message?

Thanks in advance! 

Free Windows Admin Tool Kit Click here and download it now
May 8th, 2015 8:57am

You might want to try a higher value for the sleep command. sleep.exe is no default windows command so make sure that it's available on the system where you are executing the batch.
May 8th, 2015 9:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics