Software Deployment Question

Someone help me how to use icalcs for assigning permission to files, subfolders, registry

09/13/2013 3857 views

Someone help me how to use icalcs for assigning permission to files, subfolders, registry

0 Comments   [ + ] Show comments


Community Chosen Answer


take a look at the Technet page about Icacls:


for subfolder you can best read this technet thread:


icacls cant be used to set registry permissions, you can use regini.exe for this job:


Answered 09/13/2013 by: anonymous_89761
Third Degree Brown Belt

  • regini.exe is free tool i mean built in utility of windows7? Like icalcs
    • Microsoft itself says to use regini.exe, so i asume that Windows doesnt contain a build in utility
  • Just call your sysadmin or someone with administration skills on windows and let them do the filesystem security through Group policy. That way you won't F&@& up users systems through ignorance.

    (edited by admin for language)
  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.

All Answers


Many moons ago, before we got Kace, we used some custom scripts to modify permissions on multiple computers.  Perhaps they might help you.  


You need three files to make this work:


comp1.txt (a list of computer names, IP addresses, or DNS records)


Basically you run the script from a computer that is logged in as an account that can access c$ on other computers; i.e. Domain Admin.  When you run the script it will prompt you to identify what directory you want to change, for what group or user, and what type of permission you would like to assign.  




Dim ostrcomputerDim oFilenameDim strSPDim oComputerDim directoryToUpdateDim ParmToWhomDim parmType  Set StdIn = WScript.StdInSet StdOut = WScript.StdOut  oFilename = "comp1.txt"'content of file can be NetBIOS name, IP Address, or FQDN (must be registered in DNS server)of the client computer  Wscript.Echo "Directory to update: (Example: documents and settings\all users...)" & vbcrlfdirectoryToUpdate = StdIn.ReadLineWscript.Echo "" & vbcrlf Wscript.Echo "Give Permission to what user/group (domain users, users, everyone, etc.): " & vbcrlf ParmToWhom = StdIn.ReadLineWscript.Echo "" & vbcrlf Wscript.Echo "Give what type of permission (R for Read, C for Change, F for Full): " & vbcrlf parmType = StdIn.ReadLineWscript.Echo "" & vbcrlf ' Open file to read, No error handling for opening fileSet oFs = createObject("Scripting.FilesystemObject")Set TS = OFs.OpenTextFile(oFilename,1)Do Until ts.AtEndOfStream  ostrComputer = TS.Readline  Wscript.echo ostrComputer ' Copy file to Destination' current destination is All users profiles' Desktop folder'***************************************************Set oShell = CreateObject("WScript.Shell") Call oShell.Run("cmd /c cacls.exe " & Chr(34) & "\\" & ostrcomputer & "\c$\" & directoryToUpdate & Chr(34) & " /e /t /g " & Chr(34) & ParmToWhom & Chr(34) & ":" & parmType) wscript.echo "cmd /c cacls.exe " & Chr(34) & "\\" & ostrcomputer & "\c$\" & directoryToUpdate & Chr(34) & " /e /t /g " & Chr(34) & ParmToWhom & Chr(34) & ":" & parmType If Err.number <> 0 Then          ' File couldn't be copiedWscript.Echo "Failed." & vbcrlf     Else If err.number = 0 Thenwscript.echo "Successfull." & vbcrlf        End If End IfLoopWscript.quit 
Answered 09/13/2013 by: Jbr32
10th Degree Black Belt

  • This is one more way of doing it..best part about this is both file ,folder orand regisrty permission can be managed by this
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ