[Pdx-pm] Perl Win32 help!

Spicy Spam spam at geekhouse.org
Thu Feb 3 14:42:29 PST 2005

> Michael G Schwern wrote:
>On Thu, Feb 03, 2005 at 01:36:54PM -0800, Spicy Spam wrote:
>> I am having a problem with ActiveState Perl Win32 AdminMisc module. I
>> need a way to impersonate another domain user during the life time of
>> a script. From Dave Roth's book "Win32 Perl Programming", there is a
>> section on "Impersonating a user" using his Win32::AdminMisc module (it
>> is not part of ActiveState Perl distro). I follow the instruction, run
>> "Win32::AdminMisc::LogonAsUser" and when I check the result with
>> "Win32::AdminMisc::GetLogonName", I notice the login user has not
>> changed.
>I'm going to ask the obvious question: what did LogonAsUser return?

Oh shit... it returns 0 ... doh! Now that I use
"Win32::AdminMisc::GetError" to get the error message, I find and fixed
the problem... and I need to find a place to hide :*(~~

-- Sum

More information about the Pdx-pm-list mailing list