blackadder has asked for the wisdom of the Perl Monks concerning the following question:

Is there way to remove the 'Everyone' global group account off the C:/temp without having to remove the account off the PDC
I have written the following code based on an example from the Win32::Perms readme file, however it doesn't work (nothing happens - I don't even get the cmd prompt unless I press Ctrl C)does anyone know why?And $dir->Dump display every account permissioned to access c:/temp twice

use Win32::Perms; my $dir = new Win32::Perms('c:/temp')||return 0; $dir -> Remove ('everyone'); $dir -> Dump;

Replies are listed 'Best First'.
Re: Win32::Perms question
by enoch (Chaplain) on Jun 13, 2002 at 17:07 UTC
    You need to Set() the permissions back.
    use Win32::Perms; my $dir = new Win32::Perms('c:/temp')||return 0; $dir -> Remove ('everyone'); $dir -> Set(); # here is where we apply the new perms $dir -> Dump;
    That should do the trick for you.

    My Win32::Perms->Dump() doesn't display account permissions twice. I am using ActiveState Perl v5.6.0 on Windows 2000. What version and platform are you using? Maybe if you post your output of Dump(), I would have an idea about it.

    Jeremy

      Thanks Jeremy, Set() did do the trick for me, but It only worked when passing indexes instead on names of special accounts ..like the 'Everyone'