Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had an account on my Windows Vista computer called (something like) "Maxpm (Admin)." The space in the name was causing problems with certain command-line tools, so I created a new administrator account called just "Maxpm" and moved all my files over.

Trying to delete the old account, however, crashed the "Add and remove user accounts" tool. Maxpm (Admin) no longer appears on the login screen, but the folder is still there in C:\Users. When I try to delete the folder manually, I get a slew of "Are you sure you want to do this?" confirmation dialogs, followed by a "The folder is no longer in C:\Users" error. (Even though it obviously is.)

Is there any way to remove the folder?

share|improve this question
up vote 2 down vote accepted

Try the following commands in an elevated command prompt:

net user "Maxpm (Admin)" /delete
rmdir /s /q "C:\Users\Maxpm (Admin)"

This deletes the user account (if if still exists) and its home folder. If this doesn't work, leave a comment.

share|improve this answer
You cannot delete directories with del; you need rmdir for that. Use rd/s/q "C:\Users\Maxpm (Admin)" to remove the entire profile along with subdirectories. – grawity May 18 '11 at 12:16
I stand corrected. Post edited. – bwDraco May 18 '11 at 12:29
The second command worked (the directory was removed), but the first gives me the error "The user name could not be found." I imagine the record of it was removed by the Control Panel tool before it crashed. – Maxpm May 18 '11 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .