29 Jul 2011 @ 4:07 AM 

One of my favorite registry tweaks which enables me to take ownership of folders and/or files very quickly, for example a bunch of profile directories from users when I need to delete them.
The following registry keys will add an option to the right-click menu named “Take Ownership”.
When using this option, you only need to click on “Take Ownership” and you’re done!
No more clicking to the point where you can find your username to take ownership, just do it like this… and trust me when I say that this will save you a lot of time.

[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”

Post to Twitter

Posted By: Jeff Wouters
Last Edit: 29 Jul 2011 @ 04:07 AM

EmailPermalink
Tags
Categories: Microsoft



Get Adobe Flash player
 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 164
  • Comments » 150
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Contact



    No Child Pages.