mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[USERENV]
Hack, that fixes the "Volatile Environment" bug by deleting the "Volatile Environment" key before the user hive is unloaded. CORE-10705 svn path=/trunk/; revision=70406
This commit is contained in:
parent
716992c8c7
commit
03e066f2f1
1 changed files with 23 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue