G
Guest
hello, I want to check to see if a certain registry key exists on the registry. What's the easiest way to do this. Here is what I am currently doing.
private string registryKey = @"HKEY_LOCAL_MACHINE\Software\Techtracker"
if(registryKey.Equals(Registry.Localmachine.CreateKey("Software").CreateKey("Techtracker").Name)
MessageBox.Show("Registry Key Exists")
els
MessageBox.Show("Registry Key doesn't Exists")
I also tried using registryKey.Equals(Registry.Localmachine.OpenKey("Software").OpenKey("Techtracker").Name), but this gives me an error. Any ideas or feed on this will be greatly appreciated.
private string registryKey = @"HKEY_LOCAL_MACHINE\Software\Techtracker"
if(registryKey.Equals(Registry.Localmachine.CreateKey("Software").CreateKey("Techtracker").Name)
MessageBox.Show("Registry Key Exists")
els
MessageBox.Show("Registry Key doesn't Exists")
I also tried using registryKey.Equals(Registry.Localmachine.OpenKey("Software").OpenKey("Techtracker").Name), but this gives me an error. Any ideas or feed on this will be greatly appreciated.