i want to check that registry of a particular program
actually i created two exe files and in the the second exe i want to check if registery of first exe.
if the exe of first exe is working fine then it will do some operations
if not then it will do diffrent operation
the first registry is
i check this manually in regedit .this is sucessfully added .
i add following code in second exe to check if the first registry is working or not
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("microsoft security"), 0, KEY_ALL_ACCESS, &hKey)!=ERROR_SUCCESS)
cout<<"REGISTRY ALREADY PRESENT\n";
but this is always showing message "not working" but in actual key is present as i check manually wat could be reason
plzz provide improved code