I recently added a drive that had already had a Windows installation as the second drive in my computer. Of course, Windows purposely makes it difficult to delete an installation, and even other user generated folders may not be permissioned properly.

It's kind of tedious to do this through Windows Explorer, but thankfully there are command line utilities you can use. It looks like individual Windows system folders are permissioned and owned separately, so you have to use the recursive flag. Just so you know, this will take awhile – there are a lot of subdirectories here.

c:\windows> takeown /f D:\Windows /r

Unfortunately, that may not be enough because CREATOR OWNER still doesn't have full permissions on the objects. You can fix this wit icacls (which will also take awhile as it processes each file and folder).

c:\windows> icacls "d:\windows" /grant "CREATOR OWNER":F /t

Once you do this, you should be able to delete the Windows directory. Repeat the process for any other protected folders you have trouble deleting (Program Files, etc).

In fact, because I had specific NTFS permissions set on many folders, I ran it recursively on the root drive so my local account owned all folders.


blog comments powered by Disqus