reghakr
03-21-2009, 06:44 PM
Here's a scipt which always you to take full ownership of a directory :
Copy and paste the following into Notepad and make sure All Files is showing in the drop-down box and save as takeownership.reg.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shel l\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shel l\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"
Double-click on it and restart Windows.
NOTE shel l should be shell
Copy and paste the following into Notepad and make sure All Files is showing in the drop-down box and save as takeownership.reg.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shel l\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shel l\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"
Double-click on it and restart Windows.
NOTE shel l should be shell