string into = ""; RegistryKey key = Registry.LocalMachine; RegistryKey myreg = key.OpenSubKey("software\zhixiong"); into = myreg.GetValue("aaa").ToString();