📅  最后修改于: 2022-03-11 14:49:03.849000             🧑  作者: Mango
// Open the key from the specified location
RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software", true);
// Create a new key to store your value
RegistryKey NameKey = SoftwareKey.CreateSubKey("keyName");
// Set the key value
NameKey.SetValue("yourvalue");