Discussion:
HKEY_CURRENT_USER under system account
(too old to reply)
dh
2009-08-11 03:11:03 UTC
Permalink
We have a 3rd party DLL which reads entries under HKEY_CURRENT_USER.

However, the DLL will be used under system account. My questions are:

1. System account has its own HKEY_CURRENT_USER though it is not shared with
other users?

2. If 1 is true, then what we can do is before loading the DLL, we have
another program runs under the system account too, which will write entries
into HKEY_CURRENT_USER under the system account. Then load the DLL. Will this
work?

3. Is there any better way around this, if 2 is a solution at all?

Thanks!
Scot T Brennecke
2009-08-11 07:15:49 UTC
Permalink
Post by dh
We have a 3rd party DLL which reads entries under HKEY_CURRENT_USER.
1. System account has its own HKEY_CURRENT_USER though it is not shared with
other users?
2. If 1 is true, then what we can do is before loading the DLL, we have
another program runs under the system account too, which will write entries
into HKEY_CURRENT_USER under the system account. Then load the DLL. Will this
work?
3. Is there any better way around this, if 2 is a solution at all?
Thanks!
No better way to find out than to try. Check this out:
The Old New Thing : The .Default user is not the default user:
http://blogs.msdn.com/oldnewthing/archive/2007/03/02/1786493.aspx
Uwe Sieber
2009-08-11 07:15:47 UTC
Permalink
Post by dh
We have a 3rd party DLL which reads entries under HKEY_CURRENT_USER.
1. System account has its own HKEY_CURRENT_USER though it is not shared with
other users?
Yes, it's ".DEFAULT".
Post by dh
2. If 1 is true, then what we can do is before loading the DLL, we have
another program runs under the system account too, which will write entries
into HKEY_CURRENT_USER under the system account. Then load the DLL. Will this
work?
If the DLL loads unter the system account then
HKEY_CURRENT_USER points to ".DEFAULT".
Post by dh
3. Is there any better way around this, if 2 is a solution at all?
Get the users access token (WTSQueryUserToken XP+ or steal
from explorer under W2K) and get user's HKEY_CURRENT_USER
by LoadUserProfile.


Uwe

Loading...