Mouse right click on object (folder, file), then Properties - Security, click on Advanced button. On upper side of Advanced Security Settings windows on Owner string click Change. Select the new owner. .
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" copy this code to a txt file, save and rename it to takeown.reg / if you're to lazy take that » View attachment Taking Ownership.zip
I'm interested how would you runas a dll file ... I don't see issues, "run as administrator" is still available for executables (.exe)
Oh yeah i mixed stuff up, sorry, you are right it doesn't really matter most of the time, cause .exe .bat etc have their own "runas" which overwrites the * key, so you can access Run as Administrator there.. i totaly forgot about it ^_^ Code: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\runas] "MUIVerb"="Take Ownership" "HasLUAShield"="" "NoWorkindDirectory"="" "Position"="Bottom" "Extended"="" [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] "MUIVerb"="Take Ownership" "HasLUAShield"="" "NoWorkindDirectory"="" "Position"="Bottom" "Extended"="" [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" This one is mine, pretty much the same just less ugly and hidden in the Extended Menu @ bottom. Edit: Though what i wanted to add, If you have EnableLUA set to 0, doing it as "runas" is still wrong as you won't be able to Take Ownership of a .exe or anything with its own runas key, so in this case you want to use a different key name, but as long as EnableLUA is 1 this is not possible as as the command will not get run as admin and fail.
Your Reg files are not ok for all languages For a multi language version, you must put the SID instead group name For example, in the French version of Windows 7, the group Administrators called "Administrateurs" If i use your reg files on a french version, it will not work In your reg file, if you replace Administrators with *S-1-5-32-544, you will get a version that will work for all languages of Windows Code: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\runas] "MUIVerb"="Take Ownership" "HasLUAShield"="" "NoWorkindDirectory"="" "Position"="Bottom" "Extended"="" [HKEY_CLASSES_ROOT\*\shell\runas\command] @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant *S-1-5-32-544:F" "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant *S-1-5-32-544:F" [HKEY_CLASSES_ROOT\Directory\shell\runas] "MUIVerb"="Take Ownership" "HasLUAShield"="" "NoWorkindDirectory"="" "Position"="Bottom" "Extended"="" [HKEY_CLASSES_ROOT\Directory\shell\runas\command] @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant *S-1-5-32-544:F /t" "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant *S-1-5-32-544:F /t" Sorry for my poor english
Dear friends, Is there a way to do this, but changing the permissions of the owner and es folder or file in question to "everyone"? I searched for hours and found nothing, and the traditional method takes a long time, open the properties, security, advanced, owner = set "Everyone", then permissions, delete everything and add "everyone" full control, subfolders, etc ... a lot of work ... Anyone have any ideas? PS 1: I've tried via admin prompt, and ICACLS takeown, but also is very laborious and time consuming ... PS2: I have to do this in all my HDDs customers and 18 2TB HDDs from my file server ... Please help me ... Regards Marcelo "Sushi" I also tried using the Security Identifier (SID) S-1-1-0, but still giving the user administrator active as owner of the file ...
One question, does anyone know how to delete the tokens and store folders in the spp folder inside System32 in Windows Developer Preview? I took ownership of them, and when I try to delete them it says that you need permission from Administrators to delete the folders and files when I'm the administrator. I also tried to use the Command Prompt of the recovery options of Windows 7, and then tried to delete them with the command del and nothing happens. What's the problem?