TAKE OWNERSHIP OF ANY FILE OR FOLDER ON YOUR COMPUTER

take ownership

Doing some tweaking, hacking or modifying system files many times we have to delete alter or replace default system files. For some cases the ever suspecting Windows gives us a lovely access denied dialog box.In this article we will discuss an easy way to get rid of these stupid dialog box(s)

ADDING “TAKE OWNERSHIP” OPTION ON THE CONTRAXT MENU

For anyone this is the best option, sure you will may have to get your hands dirty. After the job is done you can take ownership of any system file with just a click.

To do that you have to paste the following text in your notepad window:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\takeownership]

@=”Take ownership”

“HasLUAShield”=””

“NoWorkingDirectory”=””

[HKEY_CLASSES_ROOT\*\shell\takeownership\command]

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

“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”

[HKEY_CLASSES_ROOT\exefile\shell\takeownership]

@=”Take ownership”

“HasLUAShield”=””

“NoWorkingDirectory”=””

[HKEY_CLASSES_ROOT\exefile\shell\takeownership\command]

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

“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”

[HKEY_CLASSES_ROOT\dllfile\shell\takeownership]

@=”Take ownership”

“HasLUAShield”=””

“NoWorkingDirectory”=””

[HKEY_CLASSES_ROOT\dllfile\shell\takeownership\command]

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

“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”

[HKEY_CLASSES_ROOT\Directory\shell\takeownership]

@=”Take ownership”

“HasLUAShield”=””

“NoWorkingDirectory”=””

[HKEY_CLASSES_ROOT\Directory\shell\takeownership\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”

After you have pasted the text, just save the file giving it whatever the name you want – be sure to save it in .reg format.

Text to paste on Notepad Window

For Newbies: to do that on the save dialog box change save us type from .txt to all files. After you have done that add .reg in the end of your file name.

Take-Ownerhip

Removing Take Ownership Option from menu

If you want to remove the option form your right click menu paste the following code into a new NotePad window:


 

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\takeownership]

[-HKEY_CLASSES_ROOT\exefile\shell\takeownership]

[-HKEY_CLASSES_ROOT\dllfile\shell\takeownership]

[-HKEY_CLASSES_ROOT\Directory\shell\takeownership]


 

And then do the same that we did to add the option, that means save it in a .reg format and then double click on the file, when asked click on Yes to remove Take Ownership from the menu.

Remove take ownership Option
Do you know any other easier method for this task, if yes do drop us a comment and as always don’t forget to subscribe to our feeds.

Share