blanes
Posts: 5
Joined: Thu Oct 27, 2005 8:33 pm

Patch that adds deletes and modifies files

I am trying to create a patch which adds, deletes, and modifies files from the program's directory structure. Currently I can only get the patch to add new files and modify ones that have changed. Is there a way to automatically delete files which are no longer neccessary in the new installation? I tried adding a script to the "Custom Actions" installation directory but the repair sequence does not call on these actions. Thanks for your help.
blanes
Posts: 5
Joined: Thu Oct 27, 2005 8:33 pm

Better question

Is it possible to run a custom action on Repair?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

You should use a custom action to remove the files that aren't needed anymore. You should condition the custom action by the PATCH property. For more information on this, please visit:

http://msdn.microsoft.com/library/defau ... /patch.asp

Place this custom action in the package that has the newer version.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
blanes
Posts: 5
Joined: Thu Oct 27, 2005 8:33 pm

How do I do this with advanced installer? Where in advanced installer do I place the custom action(Install, Uninstall,Rollback)?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

You could write a script that deletes the files. This script could be placed under any standard action that is executed after the files have been installed. You could use for example, InstallFinalize. Be careful to clear any execution condition for that custom action.

An alternative solution would be to add some "File Removal" items in the second package. Be careful to include them in one of the components that gets updated by the patch.

Hope this helps.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”