Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the difference: LoadUserProfile -vs- RegOpenCurrentUser
    primarykey
    data
    text
    <p>These two APIs are very similar but it is unclear what the differences are and when each should be used (Except that LoadUserProfile is specified for use with CreateProcessAsUser which I am not using. I am simply impersonating for hive accesss).</p> <p>LoadUserProfile <a href="http://msdn.microsoft.com/en-us/library/bb762281(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb762281(VS.85).aspx</a></p> <p>RegOpenCurrentUser <a href="http://msdn.microsoft.com/en-us/library/ms724894(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms724894(VS.85).aspx</a></p> <p>According to the Services &amp; the Registry article: <a href="http://msdn.microsoft.com/en-us/library/ms685145(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms685145(VS.85).aspx</a> we should use RegOpenCurrentUser when impersonating.</p> <p>But what does/should RegOpenCurrentUser do if the user profile is roaming - should it load it?</p> <p>As far as I can tell from these docs, both APIs provide a handle to the HKEY_CURRENT_USER for the user the thread is impersonating. Therefore, they both "load" the hive i.e. lock it as a database file and give a handle to it for registry APIs.</p> <p>It might seem that LoadUserProfile loads the user profile in the same way as the User does when he/she logs on, whereas RegOpenCurrentUser does not - is this correct? What is the fundamental difference (if any) in how these two APIs mount the hive?</p> <p>What are the implications and differences (if any) between what happens IF</p> <ol> <li><p>A user logs-on or logs-off while each of these impersonated handles is already in use?</p></li> <li><p>A user is already logged-on when each matching close function (RegCloseKey and UnloadUserProfile) is called?</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload