New
#20
You could try this below to elevate administrators.
User Account Control (UAC) - Elevate Privilege Level
You could try this below to elevate administrators.
User Account Control (UAC) - Elevate Privilege Level
Hello Brink, great work you do!
For me "Take Ownership" is not working correctly. When I want to delete a folder I get the first message, see Screenshot 1. That's normal because I don't own the folder yet.
Then I select "Take Ownership" from the context menu and then I try to delete the folder again I get another message, see Screenshot 2.
The owner changed, but I'm still not the owner of the folder.
Last edited by Brink; 29 Jul 2015 at 07:30. Reason: attached your images
Hello Ubimo,
Since you do not have an English Windows installed, that would be the problem. You will need to change the y (yes) commands in bold red below from the .reg file with your language version of them. Afterwards, save and merge the .reg again.
Code:Windows Registry Editor Version 5.00 ; Created by: Shawn Brink ; https://www.tenforums.com ; Tutorial: https://www.tenforums.com/tutorials/3...dows-10-a.html [-HKEY_CLASSES_ROOT\*\shell\runas] [HKEY_CLASSES_ROOT\*\shell\runas] @="Take Ownership" "HasLUAShield"="" "NoWorkingDirectory"="" Position="middle" [HKEY_CLASSES_ROOT\*\shell\runas\command] @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F /c /l" "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F /c /l" [-HKEY_CLASSES_ROOT\Directory\shell\runas] [HKEY_CLASSES_ROOT\Directory\shell\runas] @="Take Ownership" "HasLUAShield"="" "NoWorkingDirectory"="" Position="middle" [HKEY_CLASSES_ROOT\Directory\shell\runas\command] @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t /c /l /q" "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t /c /l /q" [-HKEY_CLASSES_ROOT\dllfile\shell\runas] [HKEY_CLASSES_ROOT\dllfile\shell\runas] @="Take Ownership" "HasLUAShield"="" "NoWorkingDirectory"="" Position="middle" [HKEY_CLASSES_ROOT\dllfile\shell\runas\command] @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F /c /l" "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F /c /l" [-HKEY_CLASSES_ROOT\Drive\shell\runas] [HKEY_CLASSES_ROOT\Drive\shell\runas] @="Take Ownership" "HasLUAShield"="" "NoWorkingDirectory"="" Position="middle" [HKEY_CLASSES_ROOT\Drive\shell\runas\command] @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t /c /l /q" "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t /c /l /q" [-HKEY_CLASSES_ROOT\exefile\shell\runas] [HKEY_CLASSES_ROOT\exefile\shell\runas] "HasLUAShield"="" [HKEY_CLASSES_ROOT\exefile\shell\runas\command] @=""%1" %*" "IsolatedCommand"=""%1" %*"
I did as you said, copied your code to a .reg file, replaced the three bold, red "y" to my language ("j").
I think you missed one "y" in the 8th line from the bottom up. I tried everything. Nothing is working.
Then I tried to run this and other commands from the .reg in console: cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F /c /l
The answer was: File or folder not found
I think there is somewhere the problem?
Edit:
I did some research on the takeown command and found out that the "y" after the /d option is valid, even in my language.
Edit2:
It seems the take ownership command changes the ownership to another account which is my account but I do not have the permission to delete the folder. Weird...
Edit3:
Just for your info, I disabled UAC via Windows 10 Manager, I hope this is no problem.
In that case, see if you may be able to successfully take ownership and set permissions using OPTION FOUR below.
https://www.tenforums.com/tutorials/3...dows-10-a.html
Dear Brink, thank you for the fast responses.
As you can see the "take ownership" command already added me as owner, but I only have the permission to read or run. I can set it manually to full access but it would be more comfortable to do this with one click from the context menu. I think I have to flip some switches in the .reg file...
Take Ownership in the Context Menu worked great for me. My only problem seems to be with persistence. When I reboot the computer I'm back to square one and I have to take ownership and/or change the Permissions for HomeUsers all over again. Is there anything I can do to maintain persistence? Thanks much. Stan