You are correct in that the Win32::Perms works on printer *shares*. It does not currently support local printer objects. WMI may provide such access. Feel free to modify the Perms source and forward changes to me. ;)
-----Original Message----- From: Bullock, Howard A. [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:02 PM To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: Change permissions on a Printer Object W2K I have been told by Microsoft that access to the DACL of a printer object (not share) is only available via API (see http://support.microsoft.com/default.aspx?scid=KB;en-us;316440&) UpdatePermissionsOfPrinter Microsoft provides downloadable code on this page for a VBA program that has samples these functions. I have tried Dave Roth's PERMS module, but the code below reports the permissions on the "share" not the printer object. Can anyone either provide some code to change the permissions of a printer object on a remote server? Is this the way PERMS was intended to work? my $DACL = new Win32::Perms("printer:\\\\server\\printername") || die "Error getting Perms"; my @List; $DACL->Dump (\@List); $DACL->Dump; # exit; my $i=0; my (@Mask, @Types, @Flags, @FriendlyMask); foreach my $item (@List) { print "$i\n"; Win32::Perms::DecodeMask( $item, \@Mask, \@FriendlyMask); Win32::Perms::DecodeType( $item, \@Types ); Win32::Perms::DecodeFlag( $item, \@Flags ); print "\nMask:@FriendlyMask\nType:@Types\nFlags:@Flags\n\n"; foreach my $key (sort keys %{$item}) { print "$key: ${$item}{$key}\n"; } print "\n"; $i++; } Howard A. Bullock Global IT Infrastructure 717-810-3584 _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
