how to get value from registry code example
Example: c# get regedit value
try
{
string reqURL = "Software\\Wow6432Node\\MySQL AB\\MySQL Connector\\Net";
RegistryKey key = Registry.LocalMachine.OpenSubKey(reqUrl);
if (key != null)
{
Object o = key.GetValue("Version");
if (o != null)
{
Version version = new Version(o as String);
Version broken = new Version("6.7.4");
if (version.Equals.(broken))
{
var section = ConfigurationManager.GetSection("system.data");
DataSet dataSet = section as DataSet;
DataView vi = dataSet.Tables[0].DefaultView;
vi.Sort = "Name";
if (vi.Find("MySql") == -1)
{
dataSet.Tables[0].Rows.Add(
"MySql",
"MySql.Data.MySqlClient",
"MySql.Data.MySqlClient",
typeof(MySqlClientFactory).AssemblyQualifiedName
);
}
}
}
}
}
catch (Exception ex)
{
}