How-To Geek Forums » Windows XP
XP takeown and cacls
(5 posts)
download subinacl.exe here:
http://www.microsoft.com/downl.....laylang=en
You must be administrator.
Copy this code to a text file and change extension to .cmd
Place subinacle.exe in the same directory as the .cmd file you made and run it
code:
COPY subinacl.exe %systemdrive%\WINDOWS\system32
echo y| reg add "HKEY_CLASSES_ROOT\*\shell\runas" /ve /d "Take Ownership"
echo y| reg add "HKEY_CLASSES_ROOT\*\shell\runas\command" /ve /d "CMD /C subinacl.EXE /file ""%%
1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"
echo y| reg add "HKEY_CLASSES_ROOT\Directory\shell\runas" /ve /d "Take Ownership"
echo y| reg add "HKEY_CLASSES_ROOT\Directory\shell\runas\command" /ve /d "CMD /C subinacl.EXE
/file ""%%1\"" /owner=%username% && subinacl.EXE /subdirectories ""%%1\*.*\"" /owner=%username%
&& subinacl.EXE /file ""%%1\"" /grant=%username%=f && subinacl.EXE /subdirectories ""%%1\*.*\""
/grant=%username%=f"
echo y| reg add "HKEY_CLASSES_ROOT\Folder\shell\runas" /ve /d "Take Ownership"
echo y| reg add "HKEY_CLASSES_ROOT\Folder\shell\runas\command" /ve /d "CMD /C subinacl.EXE /file
""%%1\"" /owner=%username% && subinacl.EXE /subdirectories ""%%1\*.*\"" /owner=%username% &&
subinacl.EXE /file ""%%1\"" /grant=%username%=f && subinacl.EXE /subdirectories ""%%1\*.*\""
/grant=%username%=f"
echo y| reg add "HKEY_CLASSES_ROOT\exefile\shell\runas" /ve /d "Take Ownership"
echo y| reg add "HKEY_CLASSES_ROOT\exefile\shell\runas\command" /ve /d "CMD /C subinacl.EXE /file
""%%1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"
echo y| reg add "HKEY_CLASSES_ROOT\cmdfile\shell\runas" /ve /d "Take Ownership"
echo y| reg add "HKEY_CLASSES_ROOT\cmdfile\shell\runas\command" /ve /d "CMD /C subinacl.EXE /file
""%%1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"
echo y| REG DELETE "HKEY_CLASSES_ROOT\exefile\shell\runas\command" /V "IsolatedCommand"
Reply
You must log in to post.
