Link to home
Start Free TrialLog in
Avatar of hartnessjr
hartnessjr

asked on

adding rights to a few files

I have a program that will not run unless the user has admin rights to five files in the windows directory c:\windows

I want to set the domain users or the local users group so that they will have admin rights to all five of these files.  I figured there was some switches i can use with the net localgroup command but im not sure.  Let us assume that the files are file1, file2, file3, file4 and file5 all in the windows directory.  Let us also assume that the domain is named mydomain.  I have the ability to push the script out i just need to know a script that will run.  So basically if the script will work from a local machine it will work accros my domain.  Any help would be appreciated.
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

You need to use CALCS or XCALCS.

cacls filename /e /c /g "domain users:F"
Avatar of hartnessjr
hartnessjr

ASKER

could you expand on that leew?  what do the switches do  and what is the :F for .. along with will i need to do one of these lines for each file.. such as

cacls c:\windows\file.txt /e /c /g "domain users:F"

ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial