I need to create a registry entry in HKEY_LOCAL_MACHINE, which, in addition to its default properties, can be read by any user (including the restricted users). I am using CRegKey class with the following options
lResM = regKeyM.Create(HKEY_LOCAL_MACHINE, _T("Software\\Something"), REG_NONE,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS | KEY_READ | KEY_WRITE);
lResM = regKeyM.QueryStringValue(pName, sValue, &dwSize);
Works fine for admins and power-users, but returns lResM=5 for restricted users (Windows XP), meaning "access denied". How can I read from this registry entry under restricted account?