When nothing important like a first full install attempt fails on a clean drive you can simply nuke everything obviously when booting live from a Windows dvd as well simply using Disk Part at the command prompt for a full wipe if not manually arriving at the C: root to enter the deltree command there.
As the "Grant Admin Full Control" reg tweak that amounts to the same thing only under a different name. The system registy hasn't changed any in it's basic structure since the Legacy days when everything afterwards with 2000, XP, Vista, 7, 8 and 8.1, and now 10 still use the regedit command and still see the exact same type of structure just as the 32bit remains the 32bit kernel and the 64bit remains the 64bit kernel. The entries are slightly different being the only difference simply when someone else came along and changed the name for the same type of reg mod.
Speaking of which people were reporting problems when going to add that one while the TakeOwnership download comes complete with it's own remover! Here's one such problem indicated over at SevenForums where the solution pointed to was addressed in guide linked to the VistaForums on how to add the command without downloading any reg mod to start with.
GrantAdminFullControl REG problem
Now for the DiskCleanUp tool in 10 I would expect to most planning to run that right after a full clean install anyways to clear off all of the temp clutter the Windows installer is known for! As for an upgrade where you have all your personal files and apps from the previous version found intact and wanted on 10 you have to tweak the DC a little so it won't nuke any of those since the tool is intended to go over things on the entire drive as well. You wouldn't want to that run automatically when other things you want could be at risk but run it yourself when you can go over things first to pick and choose what gets wiped.
Text in bold represents just that, programs from System32. Most of commands are actually stand-alone programs (i.e. find.exe ping.exe tracert.exe)Code:@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
Forgot to mention Disk Cleanup was also failing! And having a really small partition meant I had to get rid of windows.old ~30GB fast, before starting to install games for testing (Dota ftw!)
Also I was using Total Commander, setup to delete read-only files. It's like I've said first, Defender must have been locking files. Or other process.
Biggest fail of Windows 8 and 10 is this nonsense with admin rights.
First what is found in the Take Ownership reg file when opened with NotePad is a bit more detailed then that.Originally Posted by AveYo;317827[B
Of course the mod is intended to insure that the name of the new item found in the right click menu is that of the mod itself. I imagine you could use any name in that line! Let's see "Goober This"?!Windows Registry Editor Version 5.00
@="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
@="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"
As far as running into apparent "HEADACHES" that comes as no surprise if you didn't get the patch with 1000 fixes? some blog was pointing to. Here the initial upgrade as upgrades over tend to be was Buggy! and neither the sound card, tuner card, or av program even would go on! Once the second upgrade was seen to the beta not 2015 version but beta for the 2016 version I had been looking at went on in a heart beat!
Get the big picture? For the time being the now working upgrade is presently on simply to get to know the new version a bit better and then dumpling it for a nice, clean HEADACHE FREE type of "Clean Install of W10"! Now doesn't that sound a bit more pleasant?
I've came across with a smart solution from a good samaritan. Here I copy HIS solution cause this was driving me crazy
I am not sure why this happens but there is a workaround.
To take control of the folder containing the undeletable create a text file called “delete.bat” and add the following lines to it:
SET DIRECTORY_NAME="C:\Locked Directory"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
You will need to change the directory path to match your requirements e.g. “C:\Locked Directory” to “C:\Delete Me”.
Right click on the file “delete.bat” select “Run As Administrator” and you should now have full control of the directory and all sub directories meaning you can do what you wish with them.
Was it not already clear that Take Ownership is only useful as a first-step against the rights management fiasco Windows does, and won't help with actually locked files because of some process using them? For those, only something like LockHunter or FileASSASSIN would stand a chance. I find LockHunter better overall, but there are cases where FileASSASSIN can unlock more.
Still, booting from the setup disk, launching a file manager like totalcmd and do deletion there is the foolproof solution.
I usually use "Unlocker Pro" to do this, you can get it from Major Geeks, etc. If you ever download it, shut off your AV programs. When installing, use "Custom Install" and de-select all "Delta Toolbar" items and install it, then you'll be able to right click on the folder, choose "Unlocker" and it brings up a control panel with "Move/Delete" functions.
Booting up in Safe Mode also allows more options without any downloads! Or you can boot live from 10 media and open the command prompt option to search and destroy since nothing including any firewall or av program will be running then.