i have to give folder permission through vbscript.
I have a share folder name "test".I have to remove "everyone" group from this folder and add "authenticated users" full control.
i have to run this script on remote computer.( thru terminal services and then run)
strComputer = "." Dim strHomeFolder, strHome, strUser Dim intRunError, objShell, objFSO strHomeFolder = "c:\apps\test" Set objShell = CreateObject("Wscript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strHomeFolder) Then intRunError = objShell.Run("%COMSPEC% /k Echo Y| cacls "& strHomeFolder &" /T /C /G "Authenticated users":F ", 2, True) If intRunError <> 0 Then Wscript.Echo "Error assigning permissions for user " _ & strUser & " to home folder " & strHomeFolder End If End If WScript.Quit
Many thanks in advance