Timothy/Darin: Thanks for your responses
All: I will use Win32::Perms to set the permissions in both the
directories/registry. I want to tackle the directories first, since it
seems easier.
The below script sets the ACL permissions to a directory, I can't seem to
figure out how to have those permissions propagate to existing files and
directories inside of c:\login (for example). I tried using SetRecurse and
that just used the harddisk for about 40 seconds (there is only 2 files in
c:\login mind you), and ended up doing nothing. Any help would be extremely
appreciated as I am getting quite frustrated/desperate! :)
use Win32;
use Win32::Perms;
&SecureKey('dir:c:\login');
sub SecureKey {
my ($Key) = @_;
my $Perms = new Win32::Perms($Key);
print "Setting permissions for: $Key\n";
($Perms) || die "Could not obtain permissions for: $Key\n";
my %Permissions = (
'Administrators' => FULL,
'Users' => READ,
);
$Perms->Remove(-1);
$Perms->Owner('Administrators');
foreach $User (keys %Permissions) {
$Perms->Allow($User, $Permissions{$User});
}
$Perms->Set() || die "Error: ($^E)";
}
---------------------------------------------------------------
Robert Blake
Technical Systems Analyst
Intel Servers, IT Shared Services - Symcor Inc.
1 Robert Speck Parkway, Mississauga, Ontario
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------
Timothy Johnson
<[EMAIL PROTECTED]> To:
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,
Sent by:
[EMAIL PROTECTED]
[EMAIL PROTECTED] cc:
eState.com Subject: RE:
Registry permissions!
11/14/02 04:44 PM
It will take some learning, but Win32::Perms from Dave Roth will work.
http://www.roth.net/perl/perms
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:rblake@;symcor.com]
Sent: Thursday, November 14, 2002 1:35 PM
To: [EMAIL PROTECTED]
Subject: Registry permissions!
I need to write a script that will set permissions on a registry key (lets
say hkey_local_machine\system) and change the permissions to specific user
access. e.g. 'Administrators' Full control, and then 'Everyone' Read. I
also need a way to propagate the permissions to keys from that point on for
some of the changes I need to make. I haven't been able to find anything in
my searches, and was wondering if someone knew a solution to my problem?
Thank you for any help you can provide!
---------------------------------------------------------------
Robert Blake
Technical Systems Analyst
Intel Servers, IT Shared Services - Symcor Inc.
1 Robert Speck Parkway, Mississauga, Ontario
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------
_______________________________________________
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
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs