Just read and used an article titled, "How to Take Ownership and Gain Full Control Permissions in Windows" which contained the below code. My question─which books do I need to read in order for me to understand why this code did what it did, and be able to do similar projects? THANKS! Marty Code: [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" [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"
You do have to be an Administrator or have an Admin Password for this to work. An Administrator can take ownership. It is not some magic trick that lets a guest own your system.
But why don't you do it then? Answer the question and stop trolling. No one forbids you to answer the question and explain. And also open your PM.
He asked ---- > ' why this code did what it did ' ...... wich isnt a good question ......because its like asking why the sentaces he wrote mean what they mean . That means that untill he clarifys what he wants to know we can only try to understand what he wants and not what he said and explain that . If anyone has a better explanation than kaljukass they should please post it
Why would i do that when i only pointed out what the OP wants to know, maybe because of all your posts starting with "i have no clue about the post" and next you post all kinds of nonsense ending with "i have no clue about it". Sadly many technical members here don't bother to answer these questions anymore, others should know their limitations. My attempt, with my limited knowledge, to explain would be: The code creates the rightclick context menu for the code to be ran which elevates privileges/rights/permissions to take over controll/ownership of certain files or folders.
Marty did you notice that you have the same thing twice in that code box ? Code: [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"