I'm using the code below to set network sharing on a folder. However, by
default the share permissions give 'Everyone' full control. I want the group
to only have read permissions. I'm fairly new to scripting and don't really
know much about setting acl's, etc so the Win32_SecurityDescriptor msdn docs
are a bit confusing. Can anyone give me some pointers or examples on how i go
about doing this?
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
strComputer = "."
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
errReturn = objNewShare.Create ("C:\Sirius", "SIRIUS", FILE_SHARE,
MAXIMUM_CONNECTIONS)
Thanks very much.
Alex.