0

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!

Ben Cawley
  • 1,606
  • 17
  • 29

2 Answers2

0

The patch (msp) is supposed to contain the changes to the previous MSI package only. If you don't change your custom table in a newer version of your MSI package, then it won't be mentioned in the patch. And that's expected.

When the patch is applied, it changes the initial MSI package (actually, patches it) and runs the reinstall. This means if your custom action which reads the custom table is NOT explicitly scheduled not to run on reinstall, then it will run and it will find the custom table.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
  • Thanks for your response - this highlights our problem nicely - the custom table is not read by a custom action and we don't try to read the data in the custom table when the patch is being executed/applied. We try to read this information when the patch is being uploaded to our deployment server - this worked nicely when we were only dealing with msi's but now we need to extend this to work with msp's as well – Ben Cawley Sep 25 '12 at 14:21
0

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.

Ben Cawley
  • 1,606
  • 17
  • 29