I am trying to write a simple script that will copy all of the windows file permissions from one file to another file. According to the documentation, this is exactly what Win32::FileSecurity does. However I keep coming into the same error, for which I cannot find any documentation.

It pretty much boils down to whenever I call the 'Set' method i get this runtime error:
Error handling error: 1722, LookupAccountName


I am running this in a winXP system with an NTFS formated file system, using ActivePerl v5.8.
The code snippet provided is from the documentation for Win32::FileSecurity



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 ) ;
   }


thanks in advance

_________________________________________________________________
Planning a family vacation? Check out the MSN Family Travel guide! http://dollar.msn.com


_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to