none
Application removal successful, but fails according to Software Center RRS feed

  • Question

  • 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

    Tuesday, October 9, 2012 9:47 AM

Answers

  • 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=414


    Jason | http://blog.configmgrftw.com


    • Edited by Jason SandysMVP Tuesday, October 9, 2012 2:03 PM
    • Marked as answer by CalleW Tuesday, October 9, 2012 2:44 PM
    Tuesday, October 9, 2012 2:02 PM

All replies

  • 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


    My Personal Blog: http://madluka.wordpress.com

    Tuesday, October 9, 2012 10:03 AM
  • Check AppEnforce.log and AppDiscovery.log.

    Torsten Meringer | http://www.mssccmfaq.de

    Tuesday, October 9, 2012 10:18 AM
    Moderator
  • 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

    Tuesday, October 9, 2012 10:34 AM
  • 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=414


    Jason | http://blog.configmgrftw.com


    • Edited by Jason SandysMVP Tuesday, October 9, 2012 2:03 PM
    • Marked as answer by CalleW Tuesday, October 9, 2012 2:44 PM
    Tuesday, October 9, 2012 2:02 PM
  • 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.

    Tuesday, October 9, 2012 2:59 PM
  • 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.


    Jason | http://blog.configmgrftw.com

    Tuesday, October 9, 2012 3:01 PM
  • 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! 

    Friday, May 8, 2015 12:55 PM
  • 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.

    Torsten Meringer | http://www.mssccmfaq.de

    Friday, May 8, 2015 1:01 PM
    Moderator
  • You could try the following in your batch file for "sleep" alternative...

    timeout /t 30 

    Change 30 to how many seconds you want.


    Check out our blog for helpful guides | https://blog.techygeekshome.info


    Thursday, March 14, 2019 11:39 AM