Patch Folder Action

The Patch Folder action allows you to compare all files in a folder with a baseline folder and generate a delta file for each, as an update is being created.  Then utilize the delta file, along with the existing file to re-create the new file on deployed systems.  This action utilizes the Microsoft Delta Compression API to generate the patch file, and re-create the new file starting from the existing file.  The physical AppLife package download size can be significantly reduced by using this action.

 

Prepare Stage

During the prepare stage, this action verifies permissions to the target folder.

Execute Stage

During the execute stage, the original existing files are backed up in case the update must be rolled back.  The action then uses the patches and applies them to the existing files.  After a patch is applied, the hash of the resulting file is compared to the hash of the target file that was taken when the update was created.  If any of the resulting file hashes do not match, the action fails and a rollback is initiated.

Cleanup Stage

Removes the backup copies that were made during the execute stage.

Rollback Stage

Replaces all target files with the original back up created prior to performing the Execute stage.

 

Patch Folder Action Editor

 

Condition – Use Shared Properties as variables to conditionally execute this action during an update.

 

Action description – Descriptive text that can be used to identify this particular action in the Actions list.

 

Client folder – The folder on the deployed client where the files to be patched exists.

 

Subdirectories – The directory below the designated client root folder that contains the files.

 

Base folder: The folder on the build machine that includes the baseline file versions.  This folder should represent the deployed client folder.

 

Target folder: The folder on the build machine that includes the target files.  As the update is built, files in the target folder are compared with their counterpart in the base folder.  If a different version exists in the base folder, a differential patch is created and added to the update.  If the file doesn’t exist in the base folder, the whole file is added to the update.

 

The Patch Folder action utilizes the Microsoft Delta Compression API to create a differential patch file between two versions of an assembly during an update build, and then packages the patch file into the update.

As the update is executed, this differential patch is combined with the base file that exists on a deployed client to construct the target file.

Utilizing the Patch Folder action can significantly reduce the size of the resulting update package.  The specific version of the baseline files must be present on the system being updated.

 

NOTE: The Windows Installer SDK must be present on the system building the update package.  Patch extraction support is available on all Windows versions later than Windows 2000.

 

See Also