While creating the wine config key, make sure that only Wine's subkeys

are volatile.
This commit is contained in:
Eric Pouech 2000-02-20 13:39:42 +00:00 committed by Alexandre Julliard
parent e8742dddde
commit 0521a541f8
1 changed files with 9 additions and 1 deletions

View File

@ -958,7 +958,15 @@ int PROFILE_LoadWineIni(void)
char buffer[MAX_PATHNAME_LEN];
const char *p;
FILE *f;
HKEY hKeySW;
/* make sure HKLM\\Software exists as non-volatile key */
if (RegCreateKeyA( HKEY_LOCAL_MACHINE, "Software", &hKeySW ))
{
ERR("Cannot create config registry key\n" );
return 0;
}
RegCloseKey( hKeySW );
if (RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config", 0, NULL,
REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &wine_profile_key, NULL ))
{
@ -1003,7 +1011,7 @@ int PROFILE_LoadWineIni(void)
goto found;
}
MESSAGE( "Can't open configuration file %s or $HOME%s\n",
WINE_INI_GLOBAL, PROFILE_WineIniName );
WINE_INI_GLOBAL, PROFILE_WineIniName );
return 0;
found: