I am having problems trying to get the GetUsers call to work. I am running ActiveState Perl 5.8.0 build 806. I have AdminMisc 20030714 installed.

The following is a test script that I am using to reproduce (and hopefully solve) my issue.

"
use Win32::AdminMisc;

$sScrap1 = $ARGV[0];

$result = Win32::AdminMisc::GetMachines($sScrap1, UF_SERVER_TRUST_ACCOUNT, [EMAIL PROTECTED], "");
if ($result ==0) {
print "Error on GetMachines.\n";
$result = Win32::AdminMisc::GetError();
print "AdminMisc result code is $result.\n";
print Win32::FormatMessage($result);
print "\n\n";
}
print "Got $#aOut machines.\n";


$result = Win32::AdminMisc::GetUsers($sScrap1, "", [EMAIL PROTECTED]);

if ($result ==0) {
   print "Error on GetUsers.  The code is:\n";
   $result = Win32::AdminMisc::GetError();
   print "AdminMisc result code is $result.\n";
   print Win32::FormatMessage($result);
   print "\n\n";
}

print STDOUT "Got $#aOut accounts.\n";

"

The call to GetMachines works fine, returning the correct number of accounts. This tells me that my installation of AdminMisc is correct. However, the call to GetUsers consistently fails. The failure results show the following:

"
Error on GetUsers.  The code is:
AdminMisc result code is 0.
The operation completed successfully.


Got -1 accounts. "


This happens no matter what windows server I run this script against. Can anyone else duplicate this and perhaps have a fix?


Thanks in advance for any help,
--Moby

--
--Moby

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin

First they came for the Jews and I did not speak out because I was not a Jew.
Then they came for the Communists and I did not speak out because I was not a Communist.
Then they came for the trade unionists and I did not speak out because I was not a trade unionist.
Then they came for me and there was no one left to speak out for me. -- Pastor Martin Niem�ller



_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to