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.
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:
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.