• Still running Windows 7 or earlier? Support for Windows 7 ended on January 14th 2020. Please review the thread here for more details.

Take Ownership Multiple files, folders, subfolders

maki

Member
Joined
Jul 5, 2015
Posts
271
Take Ownership Multiple files, folders, subfolders.


I'm not talking about system files and I'm not talking about the system. please understand it!


I am talking about user files such as text files, music, videos, pictures (partiton Non-System!)
I repeat, I'm not talking about any system files!


Menu Take Owner - I can only do this for one file or for multiple files, but I have to do it one by one and confirm with the Administrator permission.


I want regular use of each file:
COPY
DELETE




But for each such operation I have to confirm each action.

What should be improved in the script, I would not have to confirm for each file.
What to add in the function (Apply for each file, folder and subfolders)
Select MANY folders and I want to make the "Ownership"... But not work.

Windows Registry Editor Version 5.00

[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"
 
Hi maki. :wave:


All the following changes are obviously at your own risk.


You should probably use takeown parameters /R /D Y and icacls parameters /T /Q.
Read More:

Therefore the registry script could become:
Read More:

Tested on W10 home x64 v1709 b16299
 
Last edited:

All the following changes are obviously at your own risk.



I do not use anything that may result in data loss.
I've lost a lot of data and more NO!

Still looking for features in Windows 7 similar to Windows 10.
Aplly All all [ON / ENABLED] and do not ask again.
 
I tried it on a folder and this is the result (filenames changed):
SUCCESS: The file (or folder): "E:\Super**" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x1.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x2.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x3.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x4.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x5.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x6.avi" now owned by user "XILO-PC\Xilo".
SUCCESS: The file (or folder): "E:\Super**\Super**1x7.avi" now owned by user "XILO-PC\Xilo".
Successfully processed 8 files; Failed processing 0 files
Press any key to continue . . .
 
Last edited:

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top