Prevent directory and its contents from being deleted

Answered

Comments

1 comment

  • Avatar
    juanjo

    I believe the best solution is to first remove the "user" directory after it is created by the installer:

    <removeFilesFromUninstaller>
        <files>${installdir}/scenarios/user/*</files>
        <matchHiddenFiles>1</matchHiddenFiles>
    </removeFilesFromUninstaller>
    

    And then delete the scenarios folder in the <postUninstallationActionList> excluding the user directory:

    <postUninstallationActionList>
        <deleteFile>
           <path>${installer}/scenarios/*</path>
            <excludeFiles>*/user</excludeFiles>
        </deleteFile>
    </postUninstallationActionList>
    

Please sign in to leave a comment.