Jump to content

ICACLS Batch File Not Working/Runs in Loop?


Recommended Posts

Posted

Hi - hopefully this one won't be too hard, but I'm stumped.

 

I'm aiming to add "NETWORK SERVICE" with full permissions to the text file. However, when i run this batch file it just runs over and over in a loop and doesn't apply the permissions:

 

icacls C:\test\test.txt /T /grant "NETWORK SERVICE":F

 

Anything screamingly obvious?

 

Many thanks for any help!

  • 2 weeks later...
Posted

Thanks! After a restart though all is working, both ways. Not sure I did or didn't run it as administrator (though pretty sure I did.)

 

I'll take it though!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...