Changing HKCU registry permissions for other user, as Admin.

  • Thread starter Thread starter Anteaus
  • Start date Start date
A

Anteaus

Writing an applet to allow easy reallocation of userprofiles which have
become 'orphaned' from their account, for example by domain change.

Mostly working, but ran into problem with changing ownership of the user's
registry hive. The issue here is that:

If the user is not an Administrator it is no use trying to change the
ownership/permissions of the HKCU branch under their own account, if they do
not already own it. (this is as you would expect)

BUT.. if you try to modify the permissions on another useraccount's registry
as Administrator, you find you cannot do that either, because the various
registry-editing tools (and system-calls) only operate on loaded hives, and
the user-registry is only loaded for the current user, i.e. Administrator.

Seems to me the only way round this is to temporarily make the user an
Admin, log on as that user, take ownership of the HKCU registry, then log off
again, and demote the user. Enormous palaver, though. Anyone suggest an
easier method of loading the hive without changing user from Administrator?
 
Back
Top