Step 1) Add Namespace Microsoft.Win32
Step 2) Get All Registry hives using C#
void Get_Registry_hives()
{
String[]Registry_Hives=Enum.GetNames(typeof(RegistryHive));
foreach (String registryHive in Registry_Hives)
{
Console.WriteLine("Registry Hive:{0}",registryHive);
}
}
No comments:
Post a Comment