public override void SetValue(baseKey RootKey, string key, string valueName, string value, valueType ValueType) { if (IsConnected) { try { RegistryMethod.SetValue(connectionScope, RootKey, key, valueName, value, ValueType); } catch (ManagementException err) { Console.WriteLine("An error occurred: " + err.Message); } } }