Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
reset the permissions using superuser.com/questions/60700/…, you should be able to delete the files. I use this piece of batch file since it recursively goes into all directories –  Sathya Sep 21 '11 at 10:37
    
@Sathya♦ Seems to be working so far. –  AndrejaKo Sep 21 '11 at 10:39
    
@Sathya♦ Well, I did takeown /f D:\windows /r and it did some work and now when it has finished, when I tried to set permissions, I got the access denied once again. –  AndrejaKo Sep 21 '11 at 10:48
    
Try running the scripts again. If it fails, it will list the folders for which changes could not be applied - for these you can try changing the owner manually via the Properties -> Security tab –  Sathya Sep 21 '11 at 10:52
    
@Sathya♦ The script lists all directories there are in the windows directory, but when I right click on them, I get my username and administrators group shown with full permissions. –  AndrejaKo Sep 21 '11 at 14:08

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.