[wix-users] Two directory removal problems...

Lewis Henderson henderso at opentext.com
Mon Mar 21 10:00:13 PDT 2016

Hi Folks,

I'm working on a product install that also installs an apache-tomcat server.  I've got two problems during the uninstall that I'd like help with.

First, tomcat typically uses a "logs" directory under the main path to store the server log files.  However, there are no files there in the initial install, so no "logs" directory is created until the first log file is created.  I've put a <RemoveFiles ... Name="*" On="uninstall" /> and a <RemoveFolder On="uninstall" /> element in the component under the "logs" directory element.  If any log files are created, the uninstall does remove them, as well as the "logs" directory, but the base tomcat directory doesn't get removed.

I looked in the verbose uninstall log, and the FolderRemove is happening after all of the FileRemove operations, and is flagged as foreign.  I suspect that the main tomcat directory has already been processed before the "logs" directory is removed, it isn't being deleted.  How can I force the main tomcat folder to be removed in this case?

Secondly, my main INSTALLDIR uses a different FileSource than the tomcat files.  I have the following:

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="INSTALLDIR" Name="Test"
        <Directory Id="a" Name="a">
        <Directory Id="java" Name="java"
           <Directory Id="java_tomcat" Name="apache-tomcat-7.0.54">

This does put tomcat in the proper place, but on uninstall the "java" directory isn't being removed.  I tested this by not creating any tomcat log files (thus bypassing the first problem above) so the main tomcat directory itself does get removed.  However, the "java" directory still remains.  What am I missing here?  How do I get a clean uninstall?

Thanks for any help you can provide.

                                                                Lewis Henderson
                                                                OpenText, Inc.

More information about the wix-users mailing list