How to delete folders from previous install?

P

Piotr Wozniacki

Hi,

This has been asked and answered many times, but none of the answers semms
to work here. I started installing Vista from the XP, but for some reaosn
interupted and installed from the DVD boot. Unfortunately, the old
installation files were renamed "windows.old" and I can't get rid of them!
Tried from both OS'es (XP and Vista); tried taking ownership; tried running
a command prompt as administrator - still no rights to delete. What gives,
besides re-formatting?!!

Piotr
 
R

Ray

Try opening the folders and then deleting the individual folders/files, I
found that I had to do it this way. It seems that the permissions don't
carry down all the way.
There must be a better way of doing it though, I hope someone knows and
answers.

Ray
 
P

Piotr Wozniacki

Doesn't work, either. Each single file - even though I'm the owner - is
impossible to be deleted. Stupid. Do I really need to format, and
reinstal?!!

Piotr
 
R

R. C. White, MVP

Hi, Piotr.

Let's get more specific on a couple of points:
Tried from both OS'es (XP and Vista); tried taking ownership;

Ownership of what? Owned by whom?

Can you create a new User (if you haven't already) named "Piotr" (perhaps),
and have that User take Ownership of the entire drive, or, at least, the
entire \Windows.old folder? In my experience, this took much longer than I
expected because it had to take ownership of each file and folder, one at a
time. But when it finally ends, the User Piotr should be able to delete the
folder.

Let us know, step by step, exactly what you did and exactly what error
message or other result you saw.
tried running a command prompt as administrator - still no rights to
delete.

In the Command Prompt window, what command and parameters did you use? As
I'm sure you know, we don't "delete" a folder, we "remove" a directory. If
we enter simply "rd \windows.old", we probably will get a message that the
directory is not empty. If we append the /s switch, it will try to remove
the entire directory tree, including all subfolders and files, even though
not empty - but it will first ask us "Are you sure".

Again, please tell us exactly what you typed in the Command Prompt window
and exactly what results you saw.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
(Running Windows Mail 7.0 in Vista x64)
 
P

Piotr Wozniacki

Hi,

I didn't create a new account; being logged as "Piotr" I took the ownership
of the windows.old folder, including subfolder and files. I then checked the
security setting for a couple of deeply burried files - the ownership is
mine all right.

When trying to delete from Windows Explorer, there were 2 stages: first, the
system informed if I want the administrator allowing me to delete; I clicked
OK and - after a while - the error message "Accessd denied" appeared for
each consecutive file (after pressing Skip).

Very similar was how it looked in the Administrators console; I typed "rmdir
/s windows.old"; the system asked me if I'm sure, I accepted and there was a
bunch of error messages about trying to delete individual files with access
denied again.

What's my next move?

Piotr
 
J

Jane C

Which build of Vista? Disk Cleanup can now remove those pesky windows.old
folders left behind after install.
 
P

Piotr Wozniacki

I should have added that - in the list of Group or user names in the
Security tab - there is only one entry for whom ALL permissions (including
the Special permissions) are ticked. This entry is called "Unknown
identity{long_number}, and probably is just a left-over after the first
installation, just like the "windows.old" folder itself (BTW, this folder
occupies 9.62 GB on disk and contains 50194 files in 9306 folders, so
deleting each file one by one is out of question - formatting and
reinstalling would be faster).

After my first couple of trials didn't work, I deleted this Unknown identity
and now I (the user Piotr) as well as the group Administrators have full
permissions, but NOT special permissions - I guess this is the clue. How to
grand the Special permissions (last entry at the bottom of the permissions
list) to myself, or the Administrator?

Frankly, I'd have formatted the drive and reinstalled Vista long ago instead
of trying to delete the folder in question, but I think it's important to
solve the problem in a more intelligent manner - after all, we're all going
to be using Vista on the regular basis...

Right now my version is RC2 Build 5744 (x64).

Please try to help me - what do you mean by Disk cleanup, Jane C?
 
R

Richard Hay

Try this - although it says for Windows One Care - same concept applies -
just change the directory - just make sure you do this in an elevated
command prompt.
 
P

Piotr Wozniacki

Jane C said:
Which build of Vista? Disk Cleanup can now remove those pesky windows.old
folders left behind after install.
Jane C, you're a genius! I used the 'Previous wWindows installation(s)
option in Disk Cleanup and the windows.old folder is gone! Thanks!

But, it'd still be nice if we knew the method of effectively administer
permissions and organize our folders/files on our own computers, wouldn't
it?

Piotr
 
J

Jimmy Brush

Hello,

Taking ownership of files does not automatically grant you "complete
control" over the files. The only thing ownership of an object entitles you
to do is to be able to add/remove permissions, even if the object does not
explicitly give you that privilege.

The problem you are running into is that even though you have ownership of
the files, you are not granted full control over the files, as you have
noticed; or, there are files that are explicitly denying you permission,
which take precendence over allow permissions.

As long as there are no deny permissions blocking you (which should be the
case unless you upgraded from another version of Vista), the following steps
should work:

1) open admin command prompt

- Click start
- Type: cmd
- right-click it under programs
- click Run As Administrator

2) take ownership of everything

In the command prompt:
cd ..\..\windows.old
takeown /F . /A /R /D Y

3) grant yourself permission to everything

In the command prompt:
icacls . /grant:r Administrators:(F) /T /L /Q

4) Delete everything

- Make sure you close any explorer or command windows that are looking at or
inside windows.old. If you don't, you will receive an error while performing
this step.

In the command prompt:
cd ..
rmdir /S /Q windows.old

That should do it :)
 
G

Guest

I should also point out ... if windows.old contains a previous installation
of Windows Vista, things are a lot trickier due to any application
compatability junctions that may be in there.

If you look at the permissions on these junctions (such as All Users inside
the users folder), they have an entry on them that denies everyone access to
them. DO NOT remove this deny permission and perform the steps listed in my
previous post, or you may end up corrupting your current installation of
Vista.

The correct way to delete junctions is with the fsutil command-line tool:

fsutil reparsepoint delete <filename>

In any case, letting the cleanup wizard take care of things in this scenario
is much easier :)

- JB
 
K

koze

Go to the security tab from the folders (as administrator!) and remove the
everyone account first.
It has a deny everyone setting that rules all other settings out!

Ko.
 
J

Jimmy Brush

Go to the security tab from the folders (as administrator!) and remove the
everyone account first.
It has a deny everyone setting that rules all other settings out!

I would not suggest following this advice.

The only things that have the Deny-Everyone rule on them are application
compatability junctions. These are like shortcuts that point applications
that try to access them to the new vista locations.

If there is an application compatability junction inside of Windows.Old
(which would be the case if you upgraded or installed over an installation
of Windows Vista), it is pointing to the *real* location of the files in
your current windows installation, not your old files.

If you change this permission on an application compatability junction
inside of windows.old and then delete that junction, you may end up deleting
files from your current installation of windows. For example, deleting
c:\windows.old\users\username\documents\my pictures may end up deleting
c:\users\username\pictures\*.*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top