Have you ensured that the account you are running under when you do the impersonation has the appropriate privaleges to do the impersonation?
From the win32::AdminMisc docs (snipped)
LogonAsUser( $Domain, $User, $Password [, $LogonType ] ) <snip> Any script that uses this function requires the following privileges ( +you can set these in the User Manager): Privilege Description SeTcbPrivilege Act as part of the operating system. SeChangeNotify Bypass traverse checking. This privilege is needed only if the a +count the script runs under is neither the local system nor a member +of the Administrators group. SeAssignPrimaryToken Replace a process level token.
HTH.
In reply to Re: Win32::AdminMisc::LogonAsUser does not seem to work.
by BrowserUk
in thread Win32::AdminMisc::LogonAsUser does not seem to work.
by Marza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |