Tweaking.com Support Forums

Main Forum => General Computer Support => Topic started by: Angelika on February 23, 2018, 04:35:13 am

Title: [SOLVED]Take Ownership not work!
Post by: Angelika on February 23, 2018, 04:35:13 am
How to modify script so that do not click on the administrator permissions each time UAC is enabled.
There are two administrators in Windows.


Code: [Select]
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"
Title: Re: Take Ownership not work!
Post by: Boggin on February 23, 2018, 08:17:21 am
I use this for my Win 7 laptop - https://www.sevenforums.com/tutorials/1911-take-ownership-shortcut.html and this one on my Win 10 laptops - https://www.tenforums.com/tutorials/3841-add-take-ownership-context-menu-windows-10-a.html

You may also find them easier to use.
Title: Re: Take Ownership not work!
Post by: Angelika on February 23, 2018, 09:21:02 am
Thanks, now it works well.
Title: Re: [SOLVED]Take Ownership not work!
Post by: Boggin on February 23, 2018, 10:08:53 am
Good - a lot better than messing around with scripts.