Hello,

I need to delete files during un-installation based on user input. E.g. I have a custom dialog that will ask the user if he wants to remove report/log files? If user says "Yes", installation will continue as it is but if user says "No", report/log files will not be deleted and shall be kept untouched at the same location.

I can think of one dirty way of doing this.... If user says "No" , take a backup of these files and copy them back after un-installation. Is there any descent way of doing it?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Instead of creating backup for the files and utilizing more disk space as well as time to perform copy operation.
You can try renaming the folder at the time of uninstallation. i.e.
The custom dialog must be setting up a property based on 'Yes' or 'No'. So considering this property value, if user says 'No' then
- using a custom action rename the folder (say <FolderName_bak) containing this reports n log files and place it at the start of uninstallation (say after Install Validate)
- Write another custom action which will again rename it to its original name and place it after Install Finalize
- conditionalize both the custom actions so that it runs only at the time of uninstallation
Answered 06/02/2010 by: Technocrat
Senior Yellow Belt

Please log in to comment
0
You can use a vbscript to set a property which can be later used ..google "Session.property" and use that as a custom action condition for your remove files action. In short you can make those files as permananet from component table and use a delete custom action which will run only if user says no .
Answered 06/03/2010 by: blacklisted_packager
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity