I wanted to remove my user profile and all its data and credentials from a machine I was handing over to AN Other.
I know that, as usual in Windows, there is more than one way to kill a cat...
... so I used Control Panel/User Accounts (as main Admin user) and deleted User GS and all its data.
No problem - it all worked, so I thought...
Then I looked in File Explorer at C:\Users and C:\Users\GS was still there!!!
So I restarted (to be sure), looked again, selected the GS folder, Right Click/Delete ... Unsuccessful .
?Properties of folder GS = 5 folders + 0 files occupying 0 bytes, but GS appeared to be empty.
Set Show Hidden folders, and discovered Appdata with a Roaming subfolder (sorry I don't have the exact tree any more), which ended up with a references to the Libraries collection.
More sleuthing, and I found the computer I was using still had a reference to my personal cloud data in OneDrive Documents
... and then I found my OneDrive account still held a reference to this computer
- from which I thought I had just erased myself.
Deleting the referenced data from OneDrive (I didn't want it anyway) didn't break the link; and deleting the Computer name from OneDrive's list of computers fix my problem (of the stale GS folder in C:\Users) either.
After some googling I did find a way to remove the stale folder, but it sure ain't an approved method... This is what I did
Restart into Recovery environment; Advanced; Find my way to "Command Prompt" and reboot into a CMD window. I found myself in X:\Windows\System32 and then needed to find my C: drive, which wasn't Drive C: for some reason. It turned out to be drive F: I used the following five commands:
1. F: 2. cd \Users 3. Dir *. [to list the folders and be sure where I was]
4. RD /S GS [which was successful] 5. Exit and rebooted as normal...
...to find C:\Users\GS had been removed!! (but I had now destroyed the evidence of the problem too!!)
Hmmm... then I wondered about the registry... wonder what is left in there?
I searched Regedit and found many references to [ComputerName]\GS user, some of which I didn't care about but many of which I just didn't understand, but which appeared to be a bit close to the "kernel" of the system.
More worryingly, I also found many instances of a by now stale SID for user GS; so the Registry DB is now full of invalid references. Should I be worried? What else has been retained, when I thought I had deleted ALL my data??
I have TWO questions
1. What is the correct way to delete a user profile entirely? Is it always successful, even when the old user has some data in OneDrive Documents? Will the method leave stale "empty" User profile folders around? Where is this documented in Technet?
2. The registry on this system now has many references to objects which no longer exist. Is this a worry? I thought I had deleted ALL my data from this system. How can I be sure of how much of my identity still remains after I hand over the machine to AN Other? (By the way I am re-building this system for AN Other to use, and I happened to need it for personal use while my own PC was away for repair under warranty. So the option of wiping it clean, means I would have to redo quite a lot of work all over again)
I'll be interested in your comments