[SYSSETUP]

Enable the restore privilege before the call to NtUnloadKey. Disable it immediately after the call to NtUnloadKey.

svn path=/trunk/; revision=59021
This commit is contained in:
Eric Kohl 2013-05-15 22:01:07 +00:00
parent 32504caff2
commit 90810f42a4

View file

@ -915,11 +915,14 @@ InstallReactOS(HINSTANCE hInstance)
return 0;
}
SetPrivilege(SE_RESTORE_NAME, SE_PRIVILEGE_ENABLED);
/* ROS HACK, as long as NtUnloadKey is not implemented */
{
NTSTATUS Status = NtUnloadKey(NULL);
NTSTATUS Status;
SetPrivilege(SE_RESTORE_NAME, SE_PRIVILEGE_ENABLED);
Status = NtUnloadKey(NULL);
SetPrivilege(SE_RESTORE_NAME, 0);
if (Status == STATUS_NOT_IMPLEMENTED)
{
/* Create the Administrator profile */
@ -947,8 +950,6 @@ InstallReactOS(HINSTANCE hInstance)
}
/* END OF ROS HACK */
SetPrivilege(SE_RESTORE_NAME, 0);
SetupCloseInfFile(hSysSetupInf);
SetSetupType(0);