Find file paths from MSI (database) in VC ++
I have a requirement to calculate relative file paths in MSI. I am currently querying the file table to get the corresponding component in FileName. Then I use this component to query the component table and look up Directory_. Then I use this Directory_ to query the Directory table and find the parent directory of the _ directory.
Afterwards, I keep querying the Directory table for the Parent_Directory for my previous parent and constructing the file path until I delete $ TARGETDIR. Here I am simply substituting the value of the $ TARGETDIR property to get the absolute path.
My question is that it requires a lot of queries on tables in the MSI database, there is a significant performance gain. Is there a C ++ API or any VC ++ library that does this differently, or does Microsoft provide a similar (but out-of-the-box) solution? We will be very grateful for any help!
Thanks, Shankha
source to share