SetACL

SetACL is a freeware utility for manipulating security descriptors on Microsoft Windows. It used to be available under the GNU Lesser General Public License (LGPL) as a command-line utility and as an ActiveX component, but changed to a freeware license in version 3.0.0.0.
Features.
This list of features is taken from the product's web page.
Usage.
To set 'change' permissions on the directory 'C:\angela' for user 'brian' in domain 'dom1':
 SetACL.exe -on "C:\angela" -ot file -actn ace
 -ace "n:dom1\brian;p:change"
Remove write and change permission sets from Desktop, replace with 'read and execute' permissions: 
 SetACL.exe -on "\\mycomputer\C$\Documents and Settings\username\Desktop" -ot file 
 -actn ace -ace "n:mycomputer\username;p:write,change;m:revoke"
 -ace "n:mycomputer\username;p:read_ex"
An example of its use from AutoIt can be found here