diff --git a/reactos/dll/win32/userenv/profile.c b/reactos/dll/win32/userenv/profile.c index 1e8aaf3f3fd..d4b8c6e0a5c 100644 --- a/reactos/dll/win32/userenv/profile.c +++ b/reactos/dll/win32/userenv/profile.c @@ -539,8 +539,8 @@ GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir, return FALSE; } - wcscpy(lpProfileDir, szProfilePath); - } + wcscpy(lpProfileDir, szProfilePath); + } *lpcchSize = dwLength; @@ -667,8 +667,8 @@ GetDefaultUserProfileDirectoryW(LPWSTR lpProfileDir, return FALSE; } - wcscpy(lpProfileDir, szProfilePath); - } + wcscpy(lpProfileDir, szProfilePath); + } *lpcchSize = dwLength; @@ -1309,6 +1309,25 @@ UnloadUserProfile(HANDLE hToken, 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);