How to modify "Take Ownership" registry hack created by brink ?


  1. Posts : 3
    Windows 10 Pro x64
       #1

    How to modify "Take Ownership" registry hack created by brink ?


    Hi guys :)

    I need little help from you to modify "Take Ownership" registry hack created by brink => Take Ownership - Add to Context Menu in Windows 8

    I'll try to explain what i need exactly:

    When i try to open some "system protected" file or folder like this one:



    ..i want to use "Take Ownership" registry hack on that protected folder to get a full access, BUT i Do Not Want to take ownership of every single files and folders inside of that protected folder!

    For example:




    Can someone pls help me with this, and modify brink-s registry hack to work as i explained above?

    Thanks in Advance!
    Last edited by DELIJA; 06 Aug 2015 at 05:16.
      My Computer


  2. Posts : 547
    Windows 7 Enterprise x64
       #2

    you will find more help for your OS in the Windows 8 forums, just find the link at the top and register like you did here.
      My Computer


  3. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #3

    Hi Delija,

    Simply load that 'Take Ownership' reg file into your favourite text editor and replace all instances of "/r " and "/t " with nothing. These are the switches that tell the Takeown and Icacls commands to transverse into subdirectories.
      My Computer


  4. Posts : 3
    Windows 10 Pro x64
    Thread Starter
       #4

    Pyprohly said:
    Hi Delija,

    Simply load that 'Take Ownership' reg file into your favourite text editor and replace all instances of "/r " and "/t " with nothing. These are the switches that tell the Takeown and Icacls commands to transverse into subdirectories.
    Hi Pyprohly,

    Thank you for trying to help me i really appreciate it. :)

    I followed carefully your tutorial and i've done everything as you explained, but now i got this error when i click on 'Take Ownership' in context menu:




    Modified code ( without /r and /t ) :
    Code:
    Windows Registry Editor Version 5.00
    
    ; Created by: Shawn Brink
    ; https://www.tenforums.com
    ; Tutorial: https://www.tenforums.com/tutorials/3841-take-ownership-add-context-menu-windows-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /c /l & pause"
    
    
    [-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\" /d y && icacls \"%1\" /grant administrators:F /c /l /q & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /d y && icacls \"%1\" /grant administrators:F /c /l /q & pause"
    
    
    [-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /c /l & pause"
    
    
    [-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\" /d y && icacls \"%1\" /grant administrators:F /c /l /q & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /d y && icacls \"%1\" /grant administrators:F /c /l /q & pause"
    
    
    [-HKEY_CLASSES_ROOT\exefile\shell\runas]
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas]
    "HasLUAShield"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    @="\"%1\" %*"
    "IsolatedCommand"="\"%1\" %*"
    Original brink-s code:
    Code:
    Windows Registry Editor Version 5.00
    
    ; Created by: Shawn Brink
    ; https://www.tenforums.com
    ; Tutorial: https://www.tenforums.com/tutorials/3841-take-ownership-add-context-menu-windows-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /c /l & pause"
    
    
    [-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t /c /l /q & pause"
    
    
    [-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F /c /l & pause"
    
    
    [-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 & pause"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t /c /l /q & pause"
    
    
    [-HKEY_CLASSES_ROOT\exefile\shell\runas]
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas]
    "HasLUAShield"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    @="\"%1\" %*"
    "IsolatedCommand"="\"%1\" %*"

    Can you pls tell me what i'm doing wrong?

    Thanks!
      My Computer


  5. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #5

    Until you get an answer, try GiveMePower Download
    Try opening explorer in C:\Windows if it doesn't help by its own browser.
    May or may not help with what you want to do
      My Computer


  6. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #6

    DELIJA said:
    Pyprohly said:
    Hi Delija,

    Simply load that 'Take Ownership' reg file into your favourite text editor and replace all instances of "/r " and "/t " with nothing. These are the switches that tell the Takeown and Icacls commands to transverse into subdirectories.
    Hi Pyprohly,

    Thank you for trying to help me i really appreciate it. :)

    I followed carefully your tutorial and i've done everything as you explained, but now i got this error when i click on 'Take Ownership' in context menu:

    Oops. Sorry I didn't test it out.

    We need to address exactly what the error message says: the D switch cannot be used with the R switch. So remove all instances of the D switch too... also it's value. The D switch belongs to the Takeown command and it takes a value, which in this case it's "y", so remove all instances of "/d y ".
      My Computer


  7. Posts : 3
    Windows 10 Pro x64
    Thread Starter
       #7

    Pyprohly said:
    DELIJA said:
    Pyprohly said:
    Hi Delija,

    Simply load that 'Take Ownership' reg file into your favourite text editor and replace all instances of "/r " and "/t " with nothing. These are the switches that tell the Takeown and Icacls commands to transverse into subdirectories.
    Hi Pyprohly,

    Thank you for trying to help me i really appreciate it. :)

    I followed carefully your tutorial and i've done everything as you explained, but now i got this error when i click on 'Take Ownership' in context menu:

    Oops. Sorry I didn't test it out.

    We need to address exactly what the error message says: the D switch cannot be used with the R switch. So remove all instances of the D switch too... also it's value. The D switch belongs to the Takeown command and it takes a value, which in this case it's "y", so remove all instances of "/d y ".

    Now Works Like a Charm!



    Thank you so much for help Pyprohly, take ownership now works as i wanted. This is exactly what i need!

    Thanks a lot my friend, Big + rep for your effort :)


    GokAy said:
    Until you get an answer, try GiveMePower Download
    Try opening explorer in C:\Windows if it doesn't help by its own browser.
    May or may not help with what you want to do
    Hi GokAy,

    Thanks for suggestion, this is really useful tool and i'll definitely try it when i get a free time.

    Ps: I also found two very similar tools like this one, which may be useful in removing admin rights from folders and files:

    1) Remove File Access Denied or Access is Denied error

    2) How to run Explorer as administrator on Windows 8.1, Windows 8 and Windows 7
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:46.
Find Us