wixmsp

Custom Table to be included in Patch msp file


We have a CustomTable that we add to our msi when it is created. This custom table contains some binary data (xml files) that our deployment software reads when the msi is being uploaded to our deployment server.

We now have the requirement to support deployment of msp files. This means that should the user upload an msp file to our deployment server, our software should still be able to read the binary data in our CustomTable. However I've been unable to find a way to ensure that the msp file we create contains the same CustomTable.

I know that the msp contains the updated xml because I've used ORCA to see the updated tables and files. Unfortunately I don't seem to be able to programatically read data from our CustomTable because it doesnt (apparently) exist within the patch. Does anyone know of a way to access a CustomTable from an msp file?

Thanks - If clarification is needed let me know!


Solution

  • Ok, so finally have a solution to my problem.

    Since we don't have the original msi, we can create a blank msi in a temp directory and then apply the msp on top of this using ApplyTransform. Providing we create the expected table, and fill it with dummy data (fortunately we know in advance what rows are expected within this table), the process of applying the patch on top of our dummy msi allows us to successfully query the _Storages table and access the updated stream containing the new xml. This can then be processed during our msp upload.

    Not pretty but it works.