/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: AngelD 17 years ago
Red Belt
0
Look up the RemoveFile Table if the package is in the form of MSI.
Posted by: KrakaJap 17 years ago
Senior Yellow Belt
0
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
6th Degree Black Belt
0
You need to look at your condition on that CA.

REMOVE=ALL <-- for removal
Not Installed <-- for first install

for example.
Posted by: dj_xest 17 years ago
5th Degree Black Belt
0
Hi There,

You can use the RemoveFile table and specify your files to be removed there. Use "3" in the "Installmode" column to remove the files during Install and Uninstall. That's it! No need to use the scripts for the Custom Action.

Cheers!
Posted by: KrakaJap 17 years ago
Senior Yellow Belt
0
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
Posted by: dj_xest 17 years ago
5th Degree Black Belt
0
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
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