How do I remove Windows 7 installation from partition?

I want to remove Windows 7 installation from a partition WITHOUT destroying any other data on it using Windows 7 booted from another partition.

The most obvious way would be to just delete the Windows directory, but I don't have permission to do that. When I open the security settings and try to change them, I'm told that access is denied and I can't move on from there. I'm using administrator account.

So what do I do?

UPDATE: In the meantime, I found this question asking the same thing, but the answer there doesn't help.


Solution 1:

The most obvious way would be to just delete the windows directory, but I don't have permission to do that. When I open the security settings and try to change them, I'm told that access is denied and I can't move on from there. I'm using administrator account.

The SIDs on the existing Windows directory won't be valid, so you'll have to reset the SIDs to the one present on your new Windows install.

You can do this by right clicking on the Windows folder, heading over to Properties & deleting the existing SID and then adding your current user account. To complete this, you will also need to change the owner of the files(via the advanced option). But in my experience, this has never worked well on individual folders & it doesn't apply them recursively to all sub-directories.

Using the command prompt, you can use the below two commands to take ownership of the folders & then reset the SIDs.

takeown /r /d y /f *
icacls * /reset /t /c /q

Note that this doesn't preserve or respect existing security settings, to run this only if you want to reset it.