RUN programs as NT Authority\System

I had little trouble, a while back, where I lost permission on a file as an administrator.
When I search for it, I got several codes how to take ownership and reset permission.
But, It cannot be done as simply as Run As Administrator.
I had to start CMD as SYSTEM account. For this I used part of PsToolsPsExec.

So, the procedure is as follows:

Run CMD as Administrator
psexec -i -s cmd.exe

Go to the folder where the file reports Access Denied:

After that, take ownership of the file with:
takeown /R /F *

And reset permissions with icalcs:
icacls * /T /Q /C /RESET

 So this is how I solved my Access Denied on File problem.

Good Luck

About: admin