From 0521a541f8e3545eac516c628b61e132b1164227 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sun, 20 Feb 2000 13:39:42 +0000 Subject: [PATCH] While creating the wine config key, make sure that only Wine's subkeys are volatile. --- files/profile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files/profile.c b/files/profile.c index 4085f5d95db..9448832a090 100644 --- a/files/profile.c +++ b/files/profile.c @@ -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: -- 2.11.4.GIT