Change Windows registry key values

3

Is it possible to build an application that searches for a key in the Windows registry with an exact name and when it finds its value changed by a user-defined value?

If possible what is the best language to implement this? VB.NET?!

    
asked by anonymous 20.05.2014 / 12:42

1 answer

6

Yes, it is possible.

In C #:

using (RegistryKey key = Registry.LocalMachine.OpenSubKey("oMeuCaminho"))
{
    if (key != null) 
        key.SetValue("nomeDaMinhaChave", "valorDaMinhaChave", RegistryValueKind.String);
}

Or in VB.NET:

Registry.SetValue("oMeuCaminho", "nomeDaMinhaChave", "valorDaMinhaChave")

( More Information about the Registry Class on MSDN

    
20.05.2014 / 13:13