Re: cacls help

From: Matt (None@no-emails.com)
Date: 08/01/02


From: "Matt" <None@no-emails.com>
Date: Thu, 01 Aug 2002 11:30:12 GMT


This is not a very good way of doing this. I am not sure what is causing
your problem but may be if look at the methods I suggest they might
disappear.

You should use a method of creating a process then waiting for the process
to finish. The reason, your program runs another program which sets the
permissions, that program then hands that information to the LSA the applies
the permissions. By the time that your program has run calcs again the
permissions may not even be set, especially if you have lots of permissions
to set. I found this out with a similar issue. Its all do with how windows
allows different processes to have the cpu.

If you had the time you could use the ADSI SDK from the MS site, there are
plenty of examples for setting permissions in VB in an easy manner. It
certainly beats trying to set them with API calls.

Good luck,

HTH
-----
Matt

"Daniel" <Daniel_Reagan@hotmail.com> wrote in message
news:383f01c23899$e115cfd0$37ef2ecf@TKMSFTNGXA13...
> I am writing a script to create user accounts in active
> directory in vb6. i am trying to use cacls.exe, or
> xcacls.exe to set permissions on each users home
> directory. i want cacls or xcacls to export its results
> to a text file, so that i can make a log of users whose
> permissions did not get set. the output to a text file
> part works great from the command line, but when i try to
> call it from vb, i get nothing, does not even make the
> text file. does anyone know anything about this?? here
> are the lines of code that i use to call cacls.exe:
>
> Call Shell("cacls " & usr.HomeDirectory & " /t /e /c /g "&
> usr.UserName & ":C")
> Call Shell("cacls " & usr.HomeDirectory & " >C:\log.txt")
>
> of course they aren't spaced on diffrent lines like that
> any help would be appreciated!!
>



Relevant Pages

  • Re: File Associations not working
    ... Resetting the permissions seemed to fix the association problem. ... Incorrect permissions are causing the problem. ... That error means that the Windows scripting ActiveX control could not be ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: How do I set permissions with AOL?
    ... Does AOL use a Proxy Server - if it does that could be causing the problem ... with setting permissions. ... The "too many posts" problem (where the discussion web breaks when a large ... Ron Symonds (Microsoft MVP - FrontPage) ...
    (microsoft.public.frontpage.client)
  • Re: pam messages
    ... > permissions are lax ... > Any ideas on what is causing this? ...
    (Fedora)
  • Re: Error: The Template Persistent Cache initialization failed
    ... >>is causing the problem. ... I've reset the permissions and will see if ... symptom and performed all suggested actions to no avail... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: iPhoto suddenly using all of once CPU core
    ... jamiekg@xxxxxxxxxxxxxxxxxx (Jamie Kahn Genet) wrote: ... doesn't use much CPU power, but does weirdly slow my late 2007 2.8GHz ... Try running repair permissions in Disk Utility to see if that helps. ...
    (comp.sys.mac.apps)