Feature: "Take Ownership" of a file or folder?

Hi steje,

Thank you so much for searching through the hay to separate the commands for files and for folders.
Thank you also for telling me to implement the context menu through the File Type preferences. I would not have thought of this and would have fumbled under Customize / Context.

I made the context menu entries following your instructions, and it works beautifully.
:thumbsup:
Now when I export to USB, these preferences should carry---will try that later.

For anyone who would like a touch more detail about implementing the Context menu solution (rather than buttons), here is the "long version" of steje's instructions (unless I am mistaken).

Context for Files
0. Settings / File Types (or Prefs / File Types if you are using my Menu toolbar)

  1. click on "NONE (All Files)"
  2. click the Edit button
  3. select the Context Menu tab
  4. click New
  5. Work with the fields as follows:
    Action box: "Own This" (if you already have another Take Ownership installed) or "Take Ownership"
    Icon box (the small square to the right of Action): click, type "admin" in the filter, select the admin mode icon
    Function pull-down menu: MS-DOS Batch function
    Command box: paste this:
cmd.exe /c takeown /f {f}
icacls {f} /grant administrators:F
pause

Context for Folders
Same steps as for files, except:
At step 1, select "(NONE) All Folders"
At step 5, in the Command box, paste:

cmd.exe /c takeown /f {f} /r /d y
icacls {f} /grant administrators:F /t
pause

Wishing you all a beautiful weekend.

1 Like