I have a requirement to calculate the relative paths of files in a MSI. Currently, I am querying the File table to obtain the corresponding Component to the FileName. Then, I am using this Component to query the Component table and find the Directory_. Next, I use this Directory_ to query the Directory table and find the Parent Directory of the Directory_.
Subsequently, I keep querying the Directory table for the Parent_Directory to my previous Parent and constructing the path of the file, until I hit $TARGETDIR. Here I just substitute the Property Value of $TARGETDIR to get the absolute path.
My question is, since all this requires a number of queries across tables in the MSI Database, there is a considerable performance hit. Are there any API's out there in C++ or any library in VC++ that does it differently, or does Microsoft provide a similar (but Readymade) solution? Will really appreciate any kind of help!
Thanks, Shankha