Any ideas, and of course any sample code or pointers would be appreciated.
Thanks
Marty Henderson
pcHouseCall
Mar...@pchcall.com
Thanks,
Marty
pcHouseCall
just type cacls /? at any command prompt. You can do it via wmi, too, I
think. There are probably some examples in supplement four, which I can't
seem to locate right now... it was here somewhere... can anyone else here
find it? :)
Jeremy (buried in data)
jerm...@intersite.com.leftlung
(remove my leftlung to reply)
"Marty Henderson" <Mar...@pchcall.com> wrote in message
news:#BXhTUJ6AHA.1668@tkmsftngp07...
Online docs(and samples) are at:
http://support.softartisans.com/kbindex.asp
Jason
"Marty Henderson" <Mar...@pchcall.com> wrote in message
news:#BXhTUJ6AHA.1668@tkmsftngp07...
Const ADS_RIGHT_GENERIC_READ = &H80000000
Const ADS_RIGHT_GENERIC_EXECUTE = &H20000000
Const ADS_ACETYPE_ACCESS_ALLOWED = 0
Set sec = CreateObject("ADsSecurity")
Set sd = sec.GetSecurityDescriptor("FILE://c:\files")
Set dacl = sd.DiscretionaryAcl
'-- Show the ACEs in the DACL ----
For Each ace In dacl
wscript.echo ace.Trustee
wscript.echo ace.AccessMask
wscript.echo ace.AceType
Next
Set ace = CreateObject("AccessControlEntry")
ace.Trustee = "BIGCATS\administrator"
ace.AccessMask = ADS_RIGHT_GENERIC_READ Or ADS_RIGHT_GENERIC_EXECUTE
ace.AceType = ADS_ACETYPE_ACCESS_ALLOWED
dacl.AddAce ace
sd.DiscretionaryAcl = dacl
sec.SetSecurityDescriptor sd
or you could use cacls.exe which comes with Win2k
Marty Henderson <Mar...@pchcall.com> wrote in message
news:#BXhTUJ6AHA.1668@tkmsftngp07...
I knew someone would have that ADsSecurity bit. There's an alternate way,
that works with nt 4 permissions as well. The poster didn't specify what
system they were working on...
Jeremy
"Matthew Summers" <msummersR...@mail.comNOSPAM> wrote in message
news:cw1R6.11999$Uo3.4...@news6.giganews.com...