Environment: Windows XP SP3, C#, .Net 4.0
Problem:
I\'m attempting to add access to an impersonated users registry hive in an impersonation class and I\'m ru
I found that the logon type set in the call to LogonUser() can be a factor. Even when running as an administrator I couldn't get past the error unless I switched from LOGON32_LOGON_INTERACTIVE
to LOGON32_LOGON_BATCH
. You would need to be sure the "Log on as a batch job" group policy doesn't interfere though.