Is there anyway to cleanly enumerate the root keys in a registry database?

TIA

Dan