How do you determine if a user has the rights to install
a service pack?  Here's what I do and it fails.  It fails
when the administrator of MSdomain X is logged into a box
which belongs to MSdomain Y.  Here's my code.

   $bug && print qq(Run local on $thisUser\n);
   Win32API::Net::UserGetLocalGroups($thisServer, $thisUser,
$pThisArray);
   foreach $i (@thisArray) {
     if ($i =~ /Administrators/i) {
       $isAdmin = 1;
       last FIND_ADMIN;
     }
   }

   $bug && print qq(Run global on $thisUser\n);
   @array = ();
   Win32API::Net::UserGetLocalGroups($domainController, $thisUser,
$pThisArray);
   foreach $i (@thisArray) {
     if ($i =~ /Administrators/i) {
       $isAdmin = 1;
       last FIND_ADMIN;
     }
   }
 
Thanks.  Posted this before but got a message from the op 
about a virus I sent. Did I?  Thanks again.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to