File Deletion
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?
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
Answers (2)
Please log in to answer
Posted by:
Technocrat
14 years ago
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
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
Posted by:
blacklisted_packager
14 years ago
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 .
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.