Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Add "Take Ownership" to Context Menu in Windows 11
#1
How to Add "Take Ownership" to Context Menu in Windows 11

Adding the "Take Ownership" option to the context menu in Windows 11 allows you to quickly gain full access to files or folders that may be restricted or locked by system permissions. This guide will show you how to add this useful feature by editing the Windows Registry.

Step 1: Open Notepad to Create a Registry Script

1. Press Windows + S to open the search bar and type Notepad, then press Enter.
2. In Notepad, paste the following code:

 
Code:
  Windows Registry Editor Version 5.00
  [HKEY_CLASSES_ROOT\*\shell\runas]
  @="Take Ownership"
  "NoWorkingDirectory"=""
  "HasLUAShield"=""
  [HKEY_CLASSES_ROOT\*\shell\runas\command]
  @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /t"
  "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /t"
  [HKEY_CLASSES_ROOT\Directory\shell\runas]
  @="Take Ownership"
  "NoWorkingDirectory"=""
  "HasLUAShield"=""
  [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
  @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
  "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
 

Step 2: Save the Script as a .reg File

1. Click on File in Notepad, then select Save As.
2. In the Save as type dropdown, select All Files.
3. Name the file something like TakeOwnership.reg.
4. Choose a location where you want to save the file, then click Save.

Step 3: Merge the Registry File

1. Navigate to the location where you saved the TakeOwnership.reg file.
2. Double-click on the file to run it.
3. If prompted by User Account Control (UAC), click Yes.
4. A confirmation message will appear asking if you want to merge the file into the registry. Click Yes.
5. A final confirmation will indicate that the keys and values have been successfully added to the registry.

Step 4: Test the "Take Ownership" Option

1. Right-click on any file or folder, and you should now see the Take Ownership option in the context menu.
2. Click Take Ownership to gain full control over the selected file or folder.

Step 5: Remove "Take Ownership" from the Context Menu (Optional)

If you no longer want the "Take Ownership" option in the context menu, you can easily remove it by following these steps:

1. Open Notepad again and paste the following code:

 
Code:
  Windows Registry Editor Version 5.00
  [-HKEY_CLASSES_ROOT\*\shell\runas]
  [-HKEY_CLASSES_ROOT\Directory\shell\runas]
 

2. Save the file as RemoveTakeOwnership.reg using the same steps as before.
3. Double-click the RemoveTakeOwnership.reg file, confirm the prompts, and the "Take Ownership" option will be removed from the context menu.

Conclusion

By adding the "Take Ownership" option to the Windows 11 context menu, you can easily gain access to files and folders with restricted permissions. This guide provides simple steps to add or remove the feature using a registry tweak, helping you manage your files more efficiently.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)