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

0

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.

Dave Yarsky

Posted 2015-03-11T14:48:07.323

Reputation: 1

IF the files are still there, and you are a local admin, and you didn't use NTFS encryption, I imagine it should be possible to simply take ownership of your files (those from your old account), rename the newly created directory to the name of the old one so that paths will be correct, and log in with the "new" account which should then have access to the "old" files and settings. I would very strongly recommend refreshing your full system backup before doing that, however. – a CVn – 2015-03-11T15:04:00.023

No encryption was performed. I managed to get back to old session with tscon 1 /PASSWORD:passwd !. Hmm.. new account is connected with new directory, so when I rename it to old name (while I move or delete old one), after logging again, won't Windows create new directory again without reading old one? What do you mean by refreshing full system backup? – Dave Yarsky – 2015-03-11T15:22:40.467

By "refreshing your full system backup before doing that", I imply that you (a) should always have good backups, because Bad Things Happen To Data Not Backed Up, and (b) messing around with file permissions and ownership is potentially risky, so it's always good to have a last-ditch escape hatch in the form of not just a backup, but a current backup.

– a CVn – 2015-03-11T22:29:00.627

Answers

0

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.

Dave Yarsky

Posted 2015-03-11T14:48:07.323

Reputation: 1