http://qs1969.pair.com?node_id=225827


in reply to Removing users from a directory

Have you looked at Win32::FileSecurity ?
# 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 ) ; }
Update: Oops, earthboundmisfit beat me :(

Replies are listed 'Best First'.
Re: Re: Removing users from a directory
by ellem (Hermit) on Jan 10, 2003 at 15:40 UTC
    Have you looked at Win32::FileSecurity ?

    No, and I should be. Thanks
    --
    ellem@optonline.net
    There's more than one way to do it, but only some of them actually work.