alex.collins
alex.collins

Reputation: 611

Make file to be owned by SYSTEM

I have a file that needs to be owned by NT AUTHORITY\SYSTEM for security reasons. I cannot for the life of me figure out how to do this, in a batch file.

Upvotes: 0

Views: 109

Answers (1)

Carey Gregory
Carey Gregory

Reputation: 6846

Like this:

icacls foo /setowner "NT AUTHORITY\SYSTEM"

Note that you'll need to be running in an elevated command window for this to work.

Upvotes: 1

Related Questions