J
Jeff Foster
Is = supposed to be == in the if statement?
Yogi_Bear_79 said:I've been playing with the RegistryKey class in the Microsoft.Win32
namespace.
I can do various things but I can't seem to get the syntax correct to see if
a value or a key exsists.
I know I need to use the GetValue & OpenSubKey methods
I've been trying variations on these methods with no luck.
Can someone give me a working example?
This is my latest (failed) attempt
string sKey = @"\Software\Microsoft\Office\Outlook\OMI Account
Manager\Accounts\0000000";
using (RegistryKey Key = Registry.CurrentUser)
{
if (Key.OpenSubKey(sKey)= null)
{
}
}
Yogi_Bear_79 said:Getting the same results.
I'm getting the Doesn't Exist message box on keys htat exist and ones
that don't exist
private void button1_Click(object sender, System.EventArgs e)
{
string sKey = @"\Software\Microsoft\Office\Outlook\OMI Account
Manager\Accounts\00000000";