private static void MigrateStringValues(RegistryKey source, RegistryKey target, params string[] propertyNames) { for (int i=0; i<propertyNames.Length; i++) { target.SetValue(propertyNames[i], (string)source.GetValue(propertyNames[i], "")); } }