Consider a scenario where a single file in the application has undergone a change, and this file needs to be replaced in all the machines where it is Installed. In such a situation, it doesn’t make sense in creating a new package and deploy the same. Also, if we have any configuration file which the user has modified for his customization, re-installing the package will also replace those files. Hence, we will need to find a way to replace only that file.., without reinstalling the application package. That is where a patch comes into picture.
Msiexec /p ABC10_v1.msp REINSTALL=ALL REINSTALLMODE=omus
Also, double-clicking the .MSP file will patch an existing installation as well as the locally cached copy of the MSI database because the dialogs are run and they in turn set REINSTALL and REINSTALLMODE properties.
Advantages of Using Patches:
- A patch can contain an entire file or only the file bits necessary to update part of the file. This will enable the user to download an upgrade patch that is much smaller than the installation package for the entire product.
- Create and install patches that can be uninstalled singly, and in any order, without having to uninstall and reinstall the entire application and other patches.
- Skip actions associated with specific tables that are unmodified by the patch. This can significantly reduce the time required to install the patch
- An update using a patch can preserve a user customization of the application through the upgrade.