Take Ownership Registry key

Discussion in 'Programming' started by Kippykip, Aug 7, 2016.

  1. Kippykip

    Kippykip Get out of my kitchen you flying ass God King

    Messages:
    532
    Likes Received:
    11
    Gender:
    Male
    Mood:
    Pissed off
    Since Windows Vista, it's a fucking pain in the ass to make you the owner of a file.
    Here's a registry key that adds an option on the right-click context menu that lets you make changes to the file instantly.
    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 users:F && attrib -r \"%1\" && pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant users:F && attrib -r \"%1\" && pause"
    
    [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 users:F /t && attrib -r \"%1\\*.*\" && pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant users:F /t && attrib -r \"%1\\*.*\" /s && pause"
     

    Attached Files:

Share This Page