locked
Windows installer doesn't remove the physical application directory when uninstalling a web application RRS feed

  • Question

  • User862602837 posted

    Hi,

    if I'll install the web application in a different place (e.g. c:\temp) instead of the default c:\Inetpub\wwwroot, the installer won't remove the application root directory (all subdirectories and files are removed however) when uninstalling the application. What might cause this?

     

    Thanks

     

     

     

     
    
    


     

    Tuesday, October 27, 2009 11:33 AM

Answers

  • User862602837 posted

    Ok, I think I found the answer. If I'll create the physical web application folder myself (I have to do this if I want to install the application in a different location (e.g. c:\temp) than the default one) instead of letting the installer to do it, the installer can't remove it. But If I'll install the application in the default location (c:\inetpub\wwwroot) the installer creates the physical web application folder automatically itself and in that way I guess it knows also how to remove it.

    I have tried to remove the physical folder manually in the custom action (Uninstall) using the code (Directory.Delete()) 

    and it almost works but I'll get the exception "Access is denied to InstallerHandler.dll" as the Installer is obviously still using my

    InstallerHandler.dll.

    So I don't know how can I force the Installer to remove the physical application directory if it is located in a different location than the default one.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 28, 2009 5:33 AM