Dim FileService As IADsFileShare
But currently whenever I run the script it give me a error because Windows
Scripting Host doesn't know what IADsFileShare is. I assume that this
information is included in a Library somewhere. Is there anyway to include
it(Like in C)?
-Janak
P.S. I can include file when I develop in VBA because in excel there is a
option which gives you a list of libraries and you can check the ones that
you need.
"Janak Sanariya" <jan...@targetdataman.com> wrote in message
news:uvqBWXeDAHA.253@cppssbbsa05...
:
: I want to be able to write the following line in a VBscript file
:
:
:
:
Dim oSec as New ADsSecurity
Set oSD = oSec.GetSecurityDescriptor("FILE://c:\temp")
oDAcl.AclRevision = 2
' set Domain Admins group to full access
Set oAce = New AccessControlEntry
"Walter Zackery" <Please_ Respond_ Wit...@Newsgroup.com> wrote in message
news:8o3k0g$344g$1...@newssvr05-en0.news.prodigy.com...
All variables are Variants, period.
You can do this:
--------------------------
Dim oSec, oSD, oACE
Set oSec = WScript.CreateObject("????.ADsSecurity")
Set oSD = oSec.GetSecurityDescriptor(FILE://c:\temp)
Set oAce = WScript.CreateObject("ActiveDS.AccessControlEntry")
--------------------------
For the ADsSecurity object, you uneed to know the whole ProgID
and I don't have ADS Security objects loaded, so I don't know what
it is exactly.
-Chad
"Janak Sanariya" <jan...@targetdataman.com> wrote in message
news:#36KbYfDAHA.195@cppssbbsa05...
You can't declare variable types in VBSCript. They're all variants initally.
Just "Dim FileService" will do.
Here's a good place to start... I tried running the code snippet, and it
appeared to work. This will get you the security descriptor of a file...
http://msdn.microsoft.com/library/psdk/wmisdk/securityprov_9dyr.htm
And this will set the descriptor for a file:
http://msdn.microsoft.com/library/psdk/wmisdk/securityprov_5p83.htm
Both are Visual Basic snippets, but they work in VBScript rather well. Just
might take a little tweaking.