Scripts Thread, script of list network share permissions in Coding and Web Development; Is a script around to list network share permissions ?
This script can add permissions to a folder but not ...
3rd October 2013, 05:42 AM #1
- Rep Power
script of list network share permissions
Is a script around to list network share permissions ?
This script can add permissions to a folder but not add permissions to the sub folder: Anyone know how to teak it to set permissions to the folder and sub folders and files.
Dim strHomeFolder, strHome, strUser
Dim intRunError, objShell, objFSO
strHomeFolder = "\\grand\home\user"
Set objShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strHomeFolder) Then
' Assign user permission to home folder.
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " _
& strHomeFolder & " /e /c /g Administrators:F ", 2, True)
If intRunError <> 0 Then
Wscript.Echo "Error assigning permissions for user " _
& strUser & " to home folder " & strHomeFolder
IDG Tech News
3rd October 2013, 09:02 AM #2
Add /T sorted
Cacls - Modify Access Control List | SS64.com
/T Search the pathname including all subfolders.
Example: Give the Finance group Full Control of a folder and all sub folders
CACLS c:\docs\work /E /T /C /G "FinanceUsers":F
Thanks to Steve21 from:
ginger8990 (3rd October 2013)
3rd October 2013, 09:24 AM #3
It's also worth mentioning that you should be using icacls instead of cacls.
3rd October 2013, 04:32 PM #4
3rd October 2013, 04:48 PM #5
- Rep Power
Can you send me scripts forum link?
icalcls and calcls can be used to add multiple groups to tons of network share folders ?
By nLinked in forum Scripts
Last Post: 3rd September 2012, 01:24 PM
By howartp in forum Windows 7
Last Post: 10th July 2012, 05:52 PM
By SHimmer45 in forum Scripts
Last Post: 14th May 2012, 02:17 PM
By nadger119 in forum Windows Server 2008 R2
Last Post: 27th April 2012, 04:25 PM
By jgcracknell in forum Windows
Last Post: 3rd August 2010, 12:05 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread