RemoveFiles table to delete files & folders created during runtime

milindsm
milindsm used Ask the Experts™
on
Hello,

I am working on uninstaller part of the product. There are couple of folders that get created during application execution. e.g. Report folder gets created at run time at [INSTALLDIR] and all report files get generated at this folder. As this folder was not created by the installer, it remains there even after un-installation along with the files in it.

I thought of handling this by adding the details to RemoveFile table. Here's my RemoveFile entry,

To delete all report file
FileKey: ReportDir
Component_ : ComponentId
FileName: *.*
DirProperty: [INSTALLDIR]Report
InstallMode: 2

To delete report folder
FileKey: ReportDir
Component_ : ComponentId
FileName:
DirProperty: [INSTALLDIR]Report
InstallMode: 2

It is failing miserably
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
FileKey is different for both records.... please ignore typo in my post....!!!
you can't use [INSTALLDIR]Report, it has to be the name of property, and without square brackets. The table Directory has to have a record like

directory    directory_parent   defaultdir
reports      INSTALLDIR               reports

then put reports into dirproperty in RemoveTable

Author

Commented:
I tried this... first of all, it is failing for INSTALLDIR. I'd to use TARGETDIR and it worked but then, TARGETDIR itself is not getting removed :(
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

I would create a trivial sample installation and tried on it. Installation directory is removed on uninstallation without any special efforts and without any entries in removefile table (if it's empty). Also, detailed log file would show what installer decided to do and why. Also, run validation and take care of its findings.
I've requested that this question be deleted for the following reason:

                           
No comment has been added to this question in more than 21 days, so it is now classified as abandoned and is now flagged for deletion.


If there is a valid solution, please OBJECT and indicate the comments that are, or would otherwise lead to, a solution.


Use the specific format http:#axxxxxxxx for comment ID(s).


Also, please don't object simply because the author did not respond to your comment. While we understand this is frustrating, unfortunately we cannot force the author to return to the question. Unless you feel you have presented a valid, verifiable solution we'll simply delete the question.


Experts-Exchange Auto Deleter
As the author has confirmed, he was able to resolve the original problem using my first comment, although with modification. Why program directory hasn't been removed, is another problem

Split between ID http:#a33132942 and ID: http:#a33141583

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial