View Full Version : How to delete files created by the app while uninstallation?
01-01-2005, 08:11 AM
I have created a setup for an application wich created additional files at its first startup. But when the user uninstalls this app or removes the feature to wich those files belong those files will stay their.
What shall I do to let setup delete this files at uninstallation or removal of the feature?
01-01-2005, 08:18 AM
Please look at the documentation on the RemoveFiles table.
01-01-2005, 11:37 AM
I have tried this but it dosn't works for me because the app creates files in multible subidirs of a driectory an I need a methode to remove the entire contents of an folder or even the folder itself.
01-01-2005, 12:17 PM
Sucks don't it? Thank Microsoft and read this thread:
If its just one folder you should be ok. But if you have many possible sub folders your table entries are going to get complex. You may end up having to create a custom action.
01-01-2005, 02:20 PM
So I will have to create a custom action.
I think I will go and add a custom action using the deltree.exe
01-01-2005, 02:36 PM
You could use deltree.exe, but make sure it exists on your target machines. It doesn't come with NT products like XP. InstallScript has a file FolderDelete function, if you can withstand the cost of bringing the IScript engine along. Basically there are many ways to skin this cat.
01-02-2005, 10:59 AM
OK, I have sucessfully created a custom action wich deltes the entire folder wich includes the files created by the app.
But a the moment the directory will be deleted even if the user just removes the help and support files feature wich destroys the app completely. What shall I do to let setup perform those custom action only when the user removes the main-app feature?
01-02-2005, 04:01 PM
You can build a custom action based on a conditional expression based around a feature operatior. This has been covered in Help and other threads. Reply if you cant find the information on the Feature operator.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.