Ok, first thanks for all The replies.
It has in fact nothing to do with the presence of the Keys. I have written the appearance page of the desk.cpl, it set's the colors and writes the correct values to HKLM\Control Panel\Colors (at least on WinXP)

I just couldn't open the CurrentUserkey.
@Alex: I didn't ignore you, I answered to Ged's post, that I will try to find out as soon, as I get a debug-version running.
But I have found the error already: I exidently called my function from a place where there's probably no user logged on. I changed this and try a different implementation with RtlQueryRegistryValues, wich is better here.

James Tabor schrieb:
Murphy, Ged (Bolton) wrote:
  
Timo Kreuzer wrote:


    
This is the code:

 RtlFormatCurrentUserKeyPath(&CurrentUserKeyPath);
 

      
InitializeObjectAttributes(&ObjectAttributes,&CurrentUserKeyPath,OBJ_CASE_IN
SENSITIVE,NULL,NULL);

    
 Status = ZwOpenKey(&CurrentUserKeyHandle, KEY_READ, &ObjectAttributes);

And I always get Status == STATUS_OBJECT_NAME_NOT_FOUND
      
What makes you sure ZwOpenKey is failing, and not one of the functions above
it?
You should use error checking where nessesary.

Ged.
    

I looked and we only have one entry, HKEY_CURRENT_USER\Control Panel\Colors\Background.

Wine does not see any of this with regedit. Testing regedit at work (2k & XP) shows all of these 
settings.

 From wine source,
static const char * const DefSysColors[] =