How to take Ownership of a file
I need to take ownership of a file using script which does not have any users/system/administrator permission (see the attached picture). I am using the below icacls cmd line to take ownership but not working. may be I am wrong, so any help will be appreciated.
icacls "C:\Users\XXX\AppData\Local\Temp\~DF0DCA31C7F882EF82.TMP" /grant BUILTIN\Users:(m)
icacls "C:\Users\XXX\AppData\Local\Temp\~DF0DCA31C7F882EF82.TMP" /setowner SYSTEM:F