views:

192

answers:

1

Is there any API for C# (or C++) which allows for parsing ntuser.dat file which does not belong to a logged user (so that I cannot use regular registry API)?

+1  A: 

No. Just load the hive and access it normally. You can use the RegLoadKey P/Invoke. C# has no native equivalent for this but since you're talking about the registry I don't think the P/Invoke will cause platform issues for you.

Billy ONeal
But will he have permissions problems trying to access registry entries for other users?
Loadmaster
Thanks - I did not know that the file can be just loaded by regular API.
Alex
@Loadmaster: Of course there are permissions problems. There are going to be permissions issues getting to the ntuser.dat in the first place. I'm assuming Alex's solution assumes that the user running the process is an administrator.
Billy ONeal

related questions