Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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

06 Aug 2015   #1
DELIJA

Windows 10 Pro x64
 
 
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!


My System SpecsSystem Spec
.
06 Aug 2015   #2
Hacb

Windows 7 Enterprise x64
 
 

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 System SpecsSystem Spec
06 Aug 2015   #3
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

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 System SpecsSystem Spec
.

06 Aug 2015   #4
DELIJA

Windows 10 Pro x64
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
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
; http://www.tenforums.com
; Tutorial: http://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
; http://www.tenforums.com
; Tutorial: http://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 System SpecsSystem Spec
06 Aug 2015   #5
GokAy

Windows 7 Ultimate x64 SP1
 
 

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 System SpecsSystem Spec
07 Aug 2015   #6
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by DELIJA View Post
Quote   Quote: Originally Posted by Pyprohly View Post
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 System SpecsSystem Spec
07 Aug 2015   #7
DELIJA

Windows 10 Pro x64
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
Quote   Quote: Originally Posted by DELIJA View Post
Quote   Quote: Originally Posted by Pyprohly View Post
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


Quote   Quote: Originally Posted by GokAy View Post
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 System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Accidentally "Take Ownership" of the whole "Windows" folder.
I was trying to patch and install non legit Windows 7 themes and long story short, I have installed Take Ownership and had accidentally click "Take Ownership" of the C:/Windows folder and it took ownership or alot of files... So question is, would it affect anything? Good or bad? So far nothing...
General Discussion
How do I Modify a Drivers Startup Type to "Demand" by use of....?
Hello, I have been searching for a way to modify a "non-plug and play" driver to startup type to "demand" by use of the command line, vbscript or native powershell on Windows 7. Any thoughts or resources for this?
Drivers
"Access Denied" when trying to modify a joystick .ini file.
Hi all. I know there are loads of threads about access denied, and I have read loads of them. So far I haven't cured the problem. Maybe I can get a pointer or two please? I have a Windows 7 Ultimate PC. There is 1 user, which I will call "Fred". I know there is a hidden Administrator...
Network & Sharing
Taking "Ownership" of old HD - "You currently don't have permission...
I built a new system (64 bit windows 7) and would like to copy some files over from my old HD which was Windows XP 32bit. The old hard drive is healthy and functioning correctly. I'm greeted with the all too well known message "You currently don't have permission to access this folder. Click...
General Discussion
"Sharing" & "Ownership" Questions
Hi, folks. I just recently upgraded from x64 to 7x64. I know next to nothing about "sharing" and "ownership" of files, except that I hate it. I don't even know if this is the correct forum for help. I have several external HDs. They have thousands of files on them: avi, mp3, etc. I...
Network & Sharing
Bypass "Ownership" and "permissions" to files altogether!
Hello all! I don't understand what the issue is but I am logged on as administrator on my computer and only a few of my files I can access. the window will pop up stating that i don't have permission to view the file! if I am the adminitrator i should have full access to any file, right? this...
General Discussion


Our Sites

Site Links

About Us

Find 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 11:36.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App