HKCU\Software created as volatile?

Kimmo Myllyvirta kimmo.myllyvirta at
Sat Sep 17 12:40:12 CDT 2005

I've met this kind of errors so many times with fresh installs that I 
finally took a look at what was going on;
err:winecfg:set_config_key Unable to set configuration key Audio in 
section Drivers, res=1021

This error occurs because HKCU\Software is created with 
REG_OPTION_VOLATILE, thus making it impossible to create non-volatile keys
under HKCU\Software. This breaks about every app that's trying to create 
keys under "Software" - like winecfg.

This is because SystemParametersInfoW in dlls/user/sysparams.c creates 
the "HKCU\Software\Wine\Temporary System Parameters"
key with REG_OPTION_VOLATILE - and if you do not have HKCU\Software\Wine 
already available, they are crated as volatile also.
( see get_volatile_regkey() )

You can test this simply by (if you have a fresh install, you can go 
directly to 4.);
1. Opening regedit
2. Delete HKCU\Software (or HKCU\Software\Wine only)
3. Close regedit
4. Open regedit
5. Try to create a new key under HKCU\Software (or HKCU\Software\Wine, 
if you removed only that)
6. You'll get error message "Subkey must be volatile"

Any comments?

( This could be fixed in sysparams.c - already got a patch ready for it, 
but probably it's better to ensure
in wineserver that the Software\Wine exists or something, so that this 
bug does not pop up again later? )

More information about the wine-devel mailing list