New
#20
I tried these commands
but some subdirectories with their files are not deleted. Why?Code:takeown /F "<Apply_Directory_Path>\*" /R /A /D Y icacls "<Apply_Directory_Path>\*.*" /T /grant administrators:F pushd "<Apply_Directory_Path>" && ( rd /S /Q "<Apply_Directory_Path>\" 2>nul & popd )
Thanks
Bye
I have a subdirectory structure that I can not see its owner, and when I try to open it, File Explorer request the sysadmin authorization although I am logged on with an Administrators account. Why?
Using the Command Prompt, how do I become owner of this subdirectory structure with complete control over it so that I can also delete it?
Thanks
Bye
I think I found the best solution to remove a directory structure which also contains symbolic links and with ACLs managed by TrustedInstaller or Authenticated Users or System users:
Many thanks to allCode:takeown /F "<Directory_path>" /A /R /D Y /SKIPSL >nul 2>&1 icacls "<Directory_path>" /reset icacls "<Directory_path>" /grant:r Administrators:(OI)(CI)F /inheritance:e /Q /C /T /L >nul 2>&1 pushd "<Directory_path>" && ( rd /S /Q "<Directory_path>" 2>nul & popd )
Bye
Last edited by balubeto; 27 Jan 2016 at 03:41.
Hey Brink,
First time forum user here for all the wrong reasons. I've been trying to get some of my companies alpha software installed on a few work machines and I believe the folder ownership was to blame for my problems. I managed to take ownership of the C: drive on both of my machines (exactly what your post above warns not to do). Upon rebooting them, I'm stuck at the blue windows ten startup screen with the white spinner.
Am I SOL? Looking for anything I can do to revert the changes I made. At worst, I hope to be able to grab files off of the drives by hooking them up to another machine in an external caddy. At best, I can recover the machines as they were a few hours ago.
Any help would be greatly appreciated!
Thanks,
James
Hello James, and welcome to Ten Forums.
Yeah, you never want to take ownership of the C: drive as per the red warning at the top of the tutorial. It never ends well.
You could see if you may be able to do a system restore at boot using a restore point dated before this happened. You may need to boot from USB installation media since Windows is stuck.
System Restore Windows 10