Main Forum > General Computer Support

[SOLVED]Take Ownership not work!

(1/1)

Angelika:
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: ---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"
--- End code ---

Boggin:
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.

Angelika:
Thanks, now it works well.

Boggin:
Good - a lot better than messing around with scripts.

Navigation

[0] Message Index

Go to full version