note
foxops
Have you looked at
<a href = "http://search.cpan.org/author/GSAR/libwin32-0.191/FileSecurity/FileSecurity.pm"> Win32::FileSecurity </a> ?
<code>
# Gets existing DACL and modifies Administrator rights
use Win32::FileSecurity qw(MakeMask Get Set);
# These masks show up as Full Control in File Manager
$file = MakeMask( qw( FULL ) );
$dir = MakeMask( qw(
FULL
GENERIC_ALL
) );
foreach( @ARGV ) {
s/\\$//;
next unless -e;
Get( $_, \%hash ) ;
$hash{Administrator} = ( -d ) ? $dir : $file ;
Set( $_, \%hash ) ;
}
</code>
<b>Update: Oops, <a HREF="/index.pl?node_id=85698">earthboundmisfit</a> beat me :(</b>
225802
225802