C# Create Values in Registry Local Machine

后端 未结 5 1784
闹比i
闹比i 2020-12-28 15:14

The following code is not working for me:

public bool createRegistry()
{
    if (!registryExists())
    {
        Microsoft.Win32.Registry.LocalMachine.Creat         


        
5条回答
  •  自闭症患者
    2020-12-28 15:34

    Below code to create key in the registry.

    Microsoft.Win32.RegistryKey key;
    key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Wow6432Node\\Names");
    key.SetValue("Name", "Isabella");
    key.Close();
    

提交回复
热议问题