DanielCollinet Posted September 29, 2011 Posted September 29, 2011 Hi Lego,with your integrated TakeOwnership I can't take ownership of subfolders too. I do not exactly your regkeys but with my ownyou can select a topfolder and all files included will be "ownershiped". And why do have a submenu arrow with only one choice, makes no sense.My is not working for .exe files....here is my reg entry:;--------------------------------------------------------------------------------------------------[HKEY_CLASSES_ROOT\*\shell\runas]@="Take Ownership""NoWorkingDirectory"="""Icon"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\ 00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,\ 6d,00,61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,20,00,2c,\ 00,31,00,00,00[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""Icon"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\ 00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,\ 6d,00,61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,20,00,2c,\ 00,31,00,00,00[HKEY_CLASSES_ROOT\Directory\shell\runas]@="Take Ownership""NoWorkingDirectory"="""Icon"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\ 00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,\ 6d,00,61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,20,00,2c,\ 00,31,00,00,00[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""Icon"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\ 00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,\ 6d,00,61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,20,00,2c,\ 00,31,00,00,00;--------------------------------------------------------------------------------------------------thx Quote
Legolash2o Posted October 1, 2011 Posted October 1, 2011 I've just used your directory code as the file one is pretty much the same. It has it's own submenu because you can only have one "runas" section. Giving Take Ownership allows the context menu to keep Run as Administrator and allow the Take Ownership to run using admin privileges. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.