In case you don't want to take a dependency on LogParser (as powerful as it is): I would take a look at the Microsoft.Win32.RegistryKey
class (MSDN). Use OpenSubKey
to open up HKEY_CLASSES_ROOTInstallerProducts, and then call GetSubKeyNames
to, well, get the names of the subkeys.
Open up each of those in turn, call GetValue
for the value you're interested in (ProductName, I guess) and compare the result to what you're looking for.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…