Author: ekohl Date: Sun Dec 20 22:30:51 2015 New Revision: 70406
URL: http://svn.reactos.org/svn/reactos?rev=70406&view=rev Log: [USERENV] Hack, that fixes the "Volatile Environment" bug by deleting the "Volatile Environment" key before the user hive is unloaded. CORE-10705
Modified: trunk/reactos/dll/win32/userenv/profile.c
Modified: trunk/reactos/dll/win32/userenv/profile.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/profile.c... ============================================================================== --- trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] Sun Dec 20 22:30:51 2015 @@ -539,8 +539,8 @@ return FALSE; }
- wcscpy(lpProfileDir, szProfilePath); - } + wcscpy(lpProfileDir, szProfilePath); + }
*lpcchSize = dwLength;
@@ -667,8 +667,8 @@ return FALSE; }
- wcscpy(lpProfileDir, szProfilePath); - } + wcscpy(lpProfileDir, szProfilePath); + }
*lpcchSize = dwLength;
@@ -1309,6 +1309,25 @@ return FALSE; }
+ /* HACK */ + { + HKEY hUserKey; + + Error = RegOpenKeyExW(HKEY_USERS, + SidString.Buffer, + 0, + KEY_WRITE, + &hUserKey); + if (Error == ERROR_SUCCESS) + { + RegDeleteKeyW(hUserKey, + L"Volatile Environment"); + + RegCloseKey(hUserKey); + } + } + /* End of HACK */ + /* Unload the hive */ Error = RegUnLoadKeyW(HKEY_USERS, SidString.Buffer);