View Full Version : Uninstall Additional Files

05-10-2004, 11:01 PM
I am looking for a way to uninstall files that were created post install. In other words, my application creates many files while it runs, and I would like those files removed when I uninstalled. Is there some log file that my application can write to so that I can remove those files?

Mark at IS
05-11-2004, 07:33 AM
Your application can write the fully qualified file names to a text file, from which the uninstallation can read each file name by calling GetLine and delete the file by calling DeleteFile (after which the uninstallation should also delete the text file).

05-12-2004, 08:31 AM
If the files are all in one or two directories, your uninstall Script could just delete them. For example:-

DeleteDir (svTarget ^ "data", ALLCONTENTS);

If they are scattered about, then Mark's suggestion may be more practical. However, in an uninstaller I generally do not delete files that might contain user data. You should probably ask for confirmation if this is the case.

Hope that helps,