private static void MigrateInstances(RegistryKey source, RegistryKey target)
{
string[] subkeys = source.GetSubKeyNames();
for (int i = 0; i < subkeys.Length; i++) {
RegistryKey oldInstance = source.OpenSubKey(subkeys[i], false);
RegistryKey instance = target.CreateSubKey(subkeys[i]);
MigrateInstance(oldInstance, instance);
}
}