Get component code using WiX DTF
问题 I have been trying to find a way to get a Windows Installer component code given a product code. (I'm actually trying to get the component path for an installed product using a shortcut that doesn't contain the component code, but this is a longer story.) I have come across the WiX DTF (Microsoft.Deployment.WindowsInstaller) assembly and this looks like a nice way to get MSI stuff done. I was very hopeful when I wrote the following code: Session product = Installer.OpenProduct(productCode);