Re: cacls help
From: Matt (None@no-emails.com)
Date: 08/01/02
- Next message: karl [x y]: "Re: BIG Security Problem?"
- Previous message: Jerold Schulman: "* Newsgroup doc. and 5574 Tips, Tricks, and Registry Hacks - 01-Aug-2002 06:30.35 *"
- In reply to: Daniel: "cacls help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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!!
>
- Next message: karl [x y]: "Re: BIG Security Problem?"
- Previous message: Jerold Schulman: "* Newsgroup doc. and 5574 Tips, Tricks, and Registry Hacks - 01-Aug-2002 06:30.35 *"
- In reply to: Daniel: "cacls help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|