Wednesday, August 19, 2015

windows 8.1 - Recover accidentaly deleted Win 8.1 user account and get back to his session while it is still in the system?


I need help. I did 2 mistakes:



  1. Run: net user MyName /del on my account in cmd shell with Administrative privileges, while I was logged on that account.


Then I created local user account (not connected with any e-mail) with administrative privileges with the same name: MyName



  1. I switched to newly created user account.


Account was connected with an e-mail: My-Name@example.com.


I want to get things back working properly. I don't want to loose anything (e.g. %UserProfile% directory, my settings, OneDrive). In the best scenario I'd like to get back to user session before switching (I have important stuff there). I know the user session is still there!: Task Manager shows that all procesess from session before switching are up and running! When I list details about processes in TaskManager it shows processess with Session IDs: 0, 1 and 3. It looks like 1 is my old session. UPDATE 0.1: TaskManager->Users shows 2 users (with the same name) and 2 sessions, one of them is with status: Disconnected


When I switched to newly created user Windows built its environment, so now I have:



  • C:\Users\MyName directory with my settings of deleted account on with I was logged before switching;

  • C:\Users\MyName.MachineName directory with settings of newly created account on witch I switched


Is it possible to get things working back properly?



  • Get back all setting and files pertaining to the original MyName account

  • Get back to the session before switching?


I don't know where are my brains... Help please.


Update 1


I managed to get back to old session with tscon 1 /PASSWORD:passwd. But fiddling with account setting/Profile via Start screen ends with nothing (no action is performed). Event Manager shows many errors showing problems with application activations because of denied access or not sufficient storage space.


Answer



So after getting back to old session using tscon 1 /PASSWORD:passwd I stopped all applications in a safe way and made backup of most important things. Log out.


Next I took ownership of old user profile directory: C:\Users\MyName.
I made backups of both directories. Unfortunately Windows did not let me to copy all files from old profile. Using Hobocopy tool did not solved this as well.


Next I tried to trick Windows to use old profile directory by changing HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList\NewProfileSID\ProfileImagePath and \Sid to values from old profile. It did not work.


Next I copied as much files and directories as I could from C:\Users\MyName to C:\Users\MyName.MachineName.


After relogging in I connected new profile with old MS Account My-Name@example.com.


In the end new profile is the same as old one in about 85-90%. Unfortunately some user settings and App settings did not move to new profile.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...