mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy(lpProfileDir, szProfilePath);
|
wcscpy(lpProfileDir, szProfilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
*lpcchSize = dwLength;
|
*lpcchSize = dwLength;
|
||||||
|
|
||||||
|
@ -667,8 +667,8 @@ GetDefaultUserProfileDirectoryW(LPWSTR lpProfileDir,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy(lpProfileDir, szProfilePath);
|
wcscpy(lpProfileDir, szProfilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
*lpcchSize = dwLength;
|
*lpcchSize = dwLength;
|
||||||
|
|
||||||
|
@ -1309,6 +1309,25 @@ UnloadUserProfile(HANDLE hToken,
|
||||||
return FALSE;
|
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 */
|
/* Unload the hive */
|
||||||
Error = RegUnLoadKeyW(HKEY_USERS,
|
Error = RegUnLoadKeyW(HKEY_USERS,
|
||||||
SidString.Buffer);
|
SidString.Buffer);
|
||||||
|
|
Loading…
Reference in a new issue