The Computer Oracle

How can I remove the home folder for a deleted user on windows 7?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Dreaming in Puzzles

--

Chapters
00:00 How Can I Remove The Home Folder For A Deleted User On Windows 7?
00:21 Answer 1 Score 0
01:23 Accepted Answer Score 19
01:52 Answer 3 Score 0
02:57 Thank you

--

Full question
https://superuser.com/questions/477988/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows7

#avk47



ACCEPTED ANSWER

Score 19


  • In Control Panel → System click Advanced system settings.
  • In the User Profiles group click Settings….
  • Select the entry labeled "Account Unknown".
  • Click Delete.

You can directly load the User Profiles dialog by running the following command:

rundll32 sysdm.cpl,EditUserProfiles

You can also use WMI for deleting orphaned profile folders, e.g. via PowerShell:

Get-WmiObject Win32_UserProfile -Filter 'RefCount=0' | ForEach-Object {
    $_.Delete()
}



ANSWER 2

Score 0


You need to take ownership of the folder and it's contents, and then delete it. If you right click on the user folder and go to the security settings, and then click advanced, you should see an 'Owner' tab. Selecting that will display the current owner as the GUID (random ID string) of the deleted user, and other accounts which can take ownership of the folder. Click the "Edit" button and select your user account, check 'Repalce owner on subcontainers and objects", and then click apply. Once it is done, you should be able to delete the folder normally.

You could also try launching windows explorer as an administrator (Task Manager -> Show All Processes -> File, New Task (It should warn that the process will be created with administrative privileges), and then run explorer.exe. This should open a new explorer window running with full privileges. Be very, very careful. Try deleting the user folder with the Admin'd Explorer window. Close it immediately afterwards - it will let you mess up your system very quickly, and you don't want to accidentally use it.




ANSWER 3

Score 0


The other steps provided here did not work for me. Somehow while trying to follow some of these other steps I did something to remove the padlock icon that appears over the user folders. When I right clicked the user folder and selected delete most of the files were removed. But it still wouldn't let me delete the folder because it said something like CurrentDatabase_372 for Windows Mediaplayer was still being used or was running or something like that. Doing Crtl+Alt+Del I couldn't find the file on the Applications, Processes, or Services menus. I also did a system file search and that turned up nothing. I even tried unselecting the Read Only option when right clicking the user file, that didn't work. Doing the same thing with the main User file didn't work either.

Finally I got the bright idea to restart the laptop in Safe Mode by pressing and holding the F8 key before the Windows start screen. Booting in Safe Mode the file deleted quick and easy like any other file, then I emptied the trash to be sure it was gone. Reboot in normal mode and there is no trace of the file. Maybe it was user error that the other steps here didn't work. But I still got'erdone!