I need to be able to check for the installation of a particular feature from an msi installer. For context, I need to check whether the "Powershell Cmdlets" feature (TFPS from Feature table in Orca) was installed from the Team Foundation Server 2010 Power Tools installer (tfpt.msi).
I know how to check for installation of the product itself using WMI win32_product and the product code {B6DC31D8-A303-4D14-9C88-59F183F55BEC}, but the TFPS feature doesn't even install by default so it's quite common for it to be missing.
Is this possible?
Using the MsiQueryFeatureState should do it. You can do so from C++ or other languages. In VBScript it would be something like this (note that this is for a different MSI, please update the product GUID and feature name to suit your purpose):
The interesting state is INSTALLSTATE_LOCAL. This means the feature is installed locally on the local disk.
Here is more information on the down to the wire C-style win32 call: http://msdn.microsoft.com/en-us/library/aa370361(v=vs.85).aspx