Windows Perl Scripting Forums » News

Win32::Perms::ResolveSid

(2 posts)

  1. Anonymous

    I have script form Chapter 11 of Win32 Perl Programming, by David Roth. There is always error in line 09 .
    I change var $Account so:
    $Account ='\\\\$machine\\$user';
    $Account ='$domain\\$user';
    $Account ='$user';
    No effect. There is always error in line 09 .
    Where is my mistake?

    01. use Win32::Perms;
    02. my $Domain = Win32::DomainName();
    03. my $User = Win32::LoginName();
    04. my $Account = sprintf( "%s%s", ( "" ne $Domain )?
    "$Domain\\":"", $User );
    05. my %Sid = (
    06. text => "",
    07. binary => ""
    08. );
    09. if( $Sid{text} = Win32::Perms::ResolveSid( $Account, $Sid{binary} ) )
    10. {
    11. print "You are logged in as $Account.\n";
    12. print "Your SID is: $Sid{text}\n";
    13. print "Your binary SID is: '$Sid{binary}'\n";
    14. }
    15. else
    16. {
    17. print "\tCouldn't lookup the SID for $Domain\\$User: $^E\n";
    18. }

    Posted 3 years ago #
  2. Anonymous

    Always fails with error code 0x000003e5 (Overlapped I/O operation is in progress).

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.