Registry Editor for Taking Ownership of a Folder
By default, the registry settings of all the programs and files in your windows computer is specific to the user profile where it has been created or saved. When you create a new profile, there are instances that it will not allow you to access specific files or program due to permission error. Sometimes, even if the security permission has been set properly, it still give you “access denied” error message.
I have encountered this issue with one of our partners before in Windows Computer Technical Support. It took us awhile to resolve it until we found this fix. Here’s the code of the registry editor that will add option on the registry to take ownership of any files and programs. Copy and paste the code in the notepad, and save it as “takeownership.reg”.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\runas\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\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[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"
After saving it, double click on the file to run. Once the command has successfully processed, it will give you an option to take ownership of the file or program when you right click. Don’t forget to restart the Windows computer to take full effect.
This is really useful especially for securing files and applications on your computer.
If you have any question or clarification, feel free to comment below. Thanks