midnight rambler Posted May 2, 2009 Posted May 2, 2009 (edited) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Quickly takes ownership of files and folders with right click in Windows XP, Vista and 7 including executible files without replacing with the "Run as"... feature like the other versions of this tool available at many websites do so you can still run programs with elevated priveledges. This is good becouse the other codes from then internet don't work well with Windows 7by interfearing with the operations of certain programs such as backup and restore when trying make it work by adding the code for .exe files.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>The first step is to download a command line utility "subinacl.exe" http://www.microsoft.com/downloads/details...;displaylang=en and install it. After you install it browse to "X:\Program Files\Windows Resource Kits\Tools" and copy "subinacl.exe" to "x:\windows\system32" and then be sure to delete it from "X:\Program Files\Windows Resource Kits\Tools" where it installs.Important: make sure "subinacl.exe" is not in any other folder than system32 such as the program files installation directory or else it won't work. It should only be in system32.The second step is to select all of the text in this codebox, copy and paste the text to a new text file then save it.COPY subinacl.exe %systemdrive%\WINDOWS\system32\REM FILEecho y| reg add "HKEY_CLASSES_ROOT\*\shell\Take Ownership" /ve /d "Take Ownership"echo y| reg add "HKEY_CLASSES_ROOT\*\shell\Take Ownership" /v "HasLUAShield"echo y| reg add "HKEY_CLASSES_ROOT\*\shell\Take Ownership\command" /ve /d "CMD /C subinacl.EXE /file ""%%1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"REM Folderecho y| reg add "HKEY_CLASSES_ROOT\Folder\shell\Take Ownership" /ve /d "Take Ownership"echo y| reg add "HKEY_CLASSES_ROOT\Folder\shell\Take Ownership" /v "HasLUAShield"echo y| reg add "HKEY_CLASSES_ROOT\Folder\shell\Take Ownership\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"REM .CMD FILEecho y| reg add "HKEY_CLASSES_ROOT\cmdfile\shell\Take Ownership" /ve /d "Take Ownership"echo y| reg add "HKEY_CLASSES_ROOT\cmdfile\shell\Take Ownership" /v "HasLUAShield"echo y| reg add "HKEY_CLASSES_ROOT\cmdfile\shell\Take Ownership\command" /ve /d "CMD /C subinacl.EXE /file ""%%1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"REM .EXE FILEecho y| reg add "HKEY_CLASSES_ROOT\exefile\shell\Take Ownership" /ve /d "Take Ownership"echo y| reg add "HKEY_CLASSES_ROOT\exefile\shell\Take Ownership" /v "HasLUAShield"echo y| reg add "HKEY_CLASSES_ROOT\exefile\shell\Take Ownership\command" /ve /d "CMD /C subinacl.EXE /file ""%%1\"" /owner=%username% && subinacl.EXE /file ""%%1\"" /grant=%username%=f"Now you want to change file extension of the new text file from ".txt" to ".cmd".Finally, right click on the .cmd file and select "Open" from the top of the menu to add the code to your registry. You are done! Now you can right click on any file or folder and select ,' Take Ownership" from the context menu and you will have full permisions on that file or folder including all of it's contents.Updated 10-20-2009 to work on all files in windows 7 and preserve the "Run as..." feature. Edited October 20, 2009 by midnight rambler
ptrakk Posted November 29, 2013 Posted November 29, 2013 (edited) New Install Script with Line Breaks:InstallSubinacl.cmdhttp://pastebin.com/QkbUEz6UI was getting jacked up by your editor on this site cause it would create newlines for some reason on my paste. Edited November 29, 2013 by ptrakk
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now