How to configure NTFS permissions on a shared folder
Hello everyone,
I am hoping someone can us add a feature to a VBscript we are currently
using. We have a VBscript that checks for new Terminal Services profiles and
if any new ones are found it copies a folder called MPS from C:\ to
M:\metaframe\profiles\%username%\Application Data. We need to modify the
script to also add the domain\domainusers group with MODIFY rights to the
NTFS permissions of the new M:\metaframe\profiles\%username%\Application
Data\MPS folder.
Any would be greatly appreciated.
Copy of current script:
Dim fso
Dim fol
Dim fc
Dim f
dim fol_ad
Dim shellString
Dim homeFolderPath
Dim folderName
Dim objFile
dim fileName
dim append
append = 8 '--variable for OpenTextFile method
fileName = "c:\mps script\MPSscript log.txt" '--change this to the log file
path and name desired
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile(fileName, append,true)
set fol = fso.GetFolder("M:\metaframe\profiles") 'change as required
set fc = fol.SubFolders
For Each f In fc
If (f.DateCreated > Now -1) Then
folderName = f.path & "\Application Data\"
fso.CopyFolder "c:\mps",folderName,true
objFile.writeLine now & ": " & f.path
End If
Next
|