/build/static/layout/Breadcrumb_cap_w.png

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?

0 Comments   [ + ] Show comments

Answers (2)

Posted by: Technocrat 14 years ago
Senior Yellow Belt
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
Posted by: blacklisted_packager 14 years ago
Orange Belt
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 .
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ