How to add file ownership to Windows 10 Explorer with a registry edit

Create a quick and efficient way to change file ownership by editing the Windows 10 Registry file.

istock-1029937218mac.jpg
Image: dj_aof, Getty Images/iStockphoto

Changing file ownership in Microsoft Windows 10 is a fairly routine procedure, however, as we showed you in How to change ownership of files and folders in Windows 10, that routine procedure is hardly quick and efficient. It involves a deep dive through property settings with proper administrator privileges.

There is an extremely quick and efficient way to change file ownership in Windows 10, but it requires a delicate edit of the Windows Registry file. When the edit is accomplished successfully, an administrative user can change file ownership directly from Windows Explorer with a simple right-click and selection from the context menu.

This how-to tutorial shows how to edit the Windows 10 Registry file to add a change file ownership item to the context menu of Windows Explorer.

Disclaimer: Editing the Windows Registry file is a serious undertaking. A corrupted Windows Registry file could render your computer inoperable, requiring a reinstallation of the Windows 10 operating system and loss of data. Back up the Windows 10 Registry file and create a valid restore point before you proceed.

SEE: Serverless computing: A guide for IT leaders (Tech Pro Research)

Windows Registry file edit

Assuming you have performed your due diligence and backed up and created a restore point, the process begins by typing "regedit" into the Cortana search box on your Windows 10 Desktop. Click or tap the Registry Editor item in the search results to start the app, as shown in Figure A.

atakeownershipregedit.jpg
Figure A

Navigate to this key (Figure B):

Computer\HKEY_CLASSES_ROOT\*\shell

btakeownershipregedit.jpg
Figure B

Right-click "shell" and select New | Key and give it the name "runas." Double-click Default value under the runas key that you just created and give it a value of "Take Ownership" and then click OK to complete the process (Figure C).

ctakeownershipregedit.jpg
Figure C

Right-click the runas key you created again and then select New | String Value. Name the string "NoWorkingDirectory" and leave its value blank, as shown in Figure D.

dtakeownershipregedit.jpg
Figure D

Right-click the runas key you created yet again and select New | Key this time and give it the name "command." As before, double-click the Default value in the command key you just created and change its value to this command (Figure E):

cmd.exe /c takeown /f \"%1\" && icacls\"%1\" /grant administrators:F

etakeownershipregedit.jpg
Figure E

Click OK to complete the process and then right-click the command key you created and select New | String Value. Name the string "IsolatedCommand" and change its Default value to the same command from above, as shown in Figure F.

ftakeownershipregedit.jpg
Figure F

Click OK to complete the process and then Exit out of the Registry Editor. The change should be effective immediately but restarting Windows 10 is guaranteed to activate the change.

Now, when you right-click on a file from the Windows File Explorer you will see the Take Ownership item (Figure G) in the context menu, saving you a trip through several screens of properties settings.

gtakeownershipregedit.jpg
Figure G

Also see