Index: base/applications/regedit/framewnd.c =================================================================== --- base/applications/regedit/framewnd.c (révision 56828) +++ base/applications/regedit/framewnd.c (copie de travail) @@ -374,16 +374,10 @@ { LONG regLoadResult; - /* Enable the required privileges */ - EnablePrivilege(SE_BACKUP_NAME, NULL, TRUE); + /* Enable the 'restore' privilege, load the hive then disable the privilege */ EnablePrivilege(SE_RESTORE_NAME, NULL, TRUE); - - /* Load the hive */ regLoadResult = RegLoadKey(hRootKey, xPath, ofn.lpstrFile); - - /* Disable the privileges */ EnablePrivilege(SE_RESTORE_NAME, NULL, FALSE); - EnablePrivilege(SE_BACKUP_NAME, NULL, FALSE); if(regLoadResult == ERROR_SUCCESS) { @@ -418,16 +412,10 @@ /* load and set the caption and flags for dialog */ LoadString(hInst, IDS_UNLOAD_HIVE, Caption, COUNT_OF(Caption)); - /* Enable the required privileges */ - EnablePrivilege(SE_BACKUP_NAME, NULL, TRUE); + /* Enable the 'restore' privilege, unload the hive then disable the privilege */ EnablePrivilege(SE_RESTORE_NAME, NULL, TRUE); - - /* Unload the hive */ regUnloadResult = RegUnLoadKey(hRootKey, pszKeyPath); - - /* Disable the privileges */ EnablePrivilege(SE_RESTORE_NAME, NULL, FALSE); - EnablePrivilege(SE_BACKUP_NAME, NULL, FALSE); if(regUnloadResult == ERROR_SUCCESS) {