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

Last post 10-28-2009 5:33 AM by VirtualSurfer. 1 replies.

Sort Posts:

  • Windows installer doesn't remove the physical application directory when uninstalling a web application

    10-27-2009, 11:33 AM

    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

     

     

     

     
    
    


     

  • Re: Windows installer doesn't remove the physical application directory when uninstalling a web application

    10-28-2009, 5:33 AM
    Answer

    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.

    
    										                
    										                
                									    
Page 1 of 1 (2 items)