A Windows installer patch (MSP file) is a package file that contains updates for a certain application and describes which version of an application can be patched. The advantage of an MSP is that it contains only files that then become an MSI. MSPs are generally used for minor releases or small updates. I myself have a tool up my sleeve that can distribute binary differences for extremely small patches (to be released soon).
The patch contains, among other things, a product code and a patch code for the application to be changed. If the product code matches with the installed application, patching is possible. It is practical then to be able to determine this code before an installation in order to optimize a software distribution. I'll show you two solutions how to do so with PowerShell.
How do I find out the product code? One variant is found at Codeplex: MSI Powershell Module.