I wouldn't use win32::API it
could cause some machine problems.

Go on to www.roth.net and check
out some of the win32 extensions.

For example, Win32::AdminMisc::UserGetMiscAttributes
has a flag called USER_PRIV which
could show if the user priviledge could be
an administrator, which means
he could have the rights to install
the service pack.

regards,

John

-----Original Message-----
From: hugh s [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 5:55 AM
To: [EMAIL PROTECTED]
Subject: install software, rights to


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
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to