Directory and INI File Removal... ???
I have a package that I built a while back and now we are getting ready to deploy an alternative application. The original application (once installed) eventually creates custom INI files and user data files in various locations. I've tried creating custom actions within the new application package that will remove these generated files but for some reason it will not work. Does anyone know of any place I could find information on how to get specific files/directories removed via a script within a packaged application (before installation obviously). Simply uninstalling or pulling the GPO from deployment only uninstalls the application and does not removed generated files. I can't seem to find this information anywhere aside from people suggesting to use custom actions... I must be doing something wrong in my custom action. :)
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
KrakaJap
17 years ago
I actually figured it out... I neglected to execute the custom action :) But now I have a different issue... apparently I'm only executing this on installation and we need to make sure that when a GPO gets pulled it also removes the files during uninstallation. Where in the Sequences would I put this? I can't find anything regarding uninstall... only install.
Posted by:
turbokitty
17 years ago
Posted by:
dj_xest
17 years ago
Posted by:
KrakaJap
17 years ago
Will this remove folders as well as files? Having only a few generated files would be fine for this but what if I had an entire directory full of files? I wasn't aware of InstallMode 3... thanks for the advice!
EDIT: Also... what happens if the file does not exist when you try to delete it with the RemoveFile table? There may also be instances where the user feels they're savvy enough to take care of this on their own and remove the file(s) manually. :) Should they do this I don't want the uninstall to fail because of a missing file... I also do not want them to be notified of an error during uninstall. You probably know as well as I do... any kind of an error or alert on an end-user's machine is reason enough to stop everything because "life as we know it is coming to an end!" LOL
EDIT: Also... what happens if the file does not exist when you try to delete it with the RemoveFile table? There may also be instances where the user feels they're savvy enough to take care of this on their own and remove the file(s) manually. :) Should they do this I don't want the uninstall to fail because of a missing file... I also do not want them to be notified of an error during uninstall. You probably know as well as I do... any kind of an error or alert on an end-user's machine is reason enough to stop everything because "life as we know it is coming to an end!" LOL
Posted by:
dj_xest
17 years ago
Dude,
If you also want to remove a directory, you may need to add again a new row in RemoveFile table and fill up the "FileName" column. Wild cards are also accepted here. You cannot remove a folder until you have cleared up that directory with this RemoveFile table. YOu now have identical rows with an entry on FileName column as their differences.
As far as I know, it won't spit an error even if the files/folders are not there. I've been doing this for every application that I'm doing.. And I will do this until the end of time.. at least with packaging! hehehe
If you also want to remove a directory, you may need to add again a new row in RemoveFile table and fill up the "FileName" column. Wild cards are also accepted here. You cannot remove a folder until you have cleared up that directory with this RemoveFile table. YOu now have identical rows with an entry on FileName column as their differences.
As far as I know, it won't spit an error even if the files/folders are not there. I've been doing this for every application that I'm doing.. And I will do this until the end of time.. at least with packaging! hehehe
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.