QuestionsMSP Patch detection questions from a MSI newbie:
AnswersHere are the pointers you may find useful
Both take a PMSIPATCHSEQUENCEINFO parameter which allows for an array of structs. Each struct has two files. A string and a type. The type indicates if it’s a path to a patch file, a path to an XML file, or a path to an XML blob.
You can simply take the output from the XML extraction API and then pass it to the sequencing API.
Normally you already have publishing data associated with a MSP that your applying and are directed to patch a particular product. Therefore you can evaluate for that product, what set of patches to be downloaded.
If you aren’t mapping patches already to product codes, then yes, you have to determine them yourself. Of course, your other approach is to enumerate the products already present on the machine and then from that enumeration determine which patches that you have should be downloaded and applied using the product code you retrieved and the XML blobs.
You have other APIs like MsiEnumProductsEx and the like that can provide additional state on the machine.
Content credit also belongs to
- Carolyn, MSI Team Dev Lead. You can get other Carolyn insights about developing for Windows Installer from the Windows Installer Chat Archives
- Tyler, MSI Team PM. You can get other Tyler insights about developing for Windows Installer from the Windows Installer Chat Archives