Naeem Khan

Naeem Khan

  • 975
  • 802
  • 800k

Registry.CurrentUser.CreateSubKey (creates a Key if does not exists but i want only to read)

Nov 11 2009 3:34 AM
hello every one , i have one big problem . if i remove my registry key from regedit then next time software automatically create registry key . but i want that if registry does not exists then software should not be open . if it possible then let me know and my code is there RegistryKey regKeyAppRoot = Registry.CurrentUser.CreateSubKey("Software"); String GUID=(String)regKeyAppRoot.GetValue("KEY"); if (GUID == "CF91F736-2830-4233-9EC9-9C2AE482B650") { //code } else { MessageBox.Show(""); this.Close(); } Its urgent Reply me As soon as Possible Thanks in Advance

Answers (3)