----- Original Message -----
From: "Christopher Rosen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, June 11, 2005 1:27 AM
Subject: Win32::AdminMisc::UserGetMiscAttributes
> I am trying to determine all users on a given machine and the 'GetUsers'
> is doing that fine. I am then trying to determine which of those user
> accounts have the 'Password never expires' attribute set. However, the
> 'UserGetMiscAttributes' can't pull info for every user account. Wondering
> if anyone had any idea some would work and others don't.
Let perl and Windows help you out:
use warnings;
use Win32;
.
.
foreach $item(@list) {
if( Win32::AdminMisc::UserGetMiscAttributes( '', $item, \%Hash ) )
{print "$item: ok\n"}
else {print "$item: NOT ok: $!: ",
Win32::FormatMessage(Win32::GetLastError()), "\n"}
}
Not entirely sure that either $! or
Win32::FormatMessage(Win32::GetLastError()) will help - but worth a try.
Other than that, I can't think of anything except trying to find what the
failures have in common with each other (but don't have in common with the
users for which UserGetMiscAttributes() succeeds).
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs