private static void RemoveFileAssociation(FileAssociation fileAssociation, DefinitionIdentity subId, string productName) { using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Classes", true)) { if (key != null) { Logger.AddMethodCall("RemoveFileAssociation(" + fileAssociation.ToString() + ") called."); RemoveFileAssociationExtentionInfo(fileAssociation, subId, key, productName); string clsIdString = RemoveFileAssociationProgIDInfo(fileAssociation, subId, key, productName); if (clsIdString != null) { RemoveFileAssociationCLSIDInfo(fileAssociation, subId, key, clsIdString, productName); } } } }