Windows:MoveOutlookOST: Difference between revisions

From Nigel's Wiki
Jump to navigation Jump to search
(Created page with "I recently built a new computer and in the process my main profile name changed. My old computer used a local account "nigelreed" and the new one using an online account "nige...")
 
No edit summary
Line 12: Line 12:
From the old system, export HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook
From the old system, export HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook


If you already pulled the disk to copy your data you can run regedit and load the NTUSER.DAT from the home directory into the HKEY_USERS section. Just select HKEY_USERS then File > Load Hive and select the NTUSER.DAT file. Browse to \Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook and export it to a .reg file. We'll use profile.reg for now.
If you already pulled the disk to copy your data you can run regedit and load the NTUSER.DAT from the home directory into the HKEY_USERS section. Just select HKEY_USERS then File > Load Hive and select the NTUSER.DAT file. Browse to \Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook and export it to a .reg file. We'll use profile.reg for now. Make a copy so we can go back in case anything gets messed up.


Open profile.reg in notepad.
Open profile.reg in notepad.
Line 34: Line 34:


  96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
  96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
  00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,'''72,00,65,00,65,00,64,00,\
  00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,'''72,00,65,00,65,00,64,00,\'''
  5c''',00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00
  '''5c''',00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00


In the above example you can see that the slash is on the next line.
In the above example you can see that the slash is on the next line.
Line 41: Line 41:
  96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
  96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
  00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,\
  00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,\
  5c''',00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00
  5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00




Line 54: Line 54:
This converts to
This converts to


46 72 65 64 42 6c 6f 67 67 73  
46 72 65 64 42 6c 6f 67 67 73<br>
F  r  e  d  B  l  o  g  g  s
F  r  e  d  B  l  o  g  g  s


Line 80: Line 80:




At this point go into Control Panel > Mail (Microsoft Outlook) and look
At this point go into Control Panel > Mail (Microsoft Outlook) and look at "Data Files". They should all now be pointing to your new location. If the data looks corrupt (possibly Chinese or odd ascii characters) then you messed up your profile.reg. Don't panic, see if you can fix it or copy over the backup file start again and re-import into the registry.
 
 
 
 
 




At this stage you may load Outlook. It may complain about passwords for IMAP/POP3 accounts so just go into Account Settings within Outlook and enter the password. Exchange accounts should popup with a password box.




Of course, YMMV but this did work for me without having to delete, recreate, or anything else with my .ost files.





Revision as of 17:35, 8 February 2018

I recently built a new computer and in the process my main profile name changed. My old computer used a local account "nigelreed" and the new one using an online account "nigel".

When I imported the registry and moved the ost I found I was getting error messages.

Outlook data file cannot be accessed was one of them.


It's actually a simple, but time consuming fix and you need to be familiar with ASCII codes


From the old system, export HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook

If you already pulled the disk to copy your data you can run regedit and load the NTUSER.DAT from the home directory into the HKEY_USERS section. Just select HKEY_USERS then File > Load Hive and select the NTUSER.DAT file. Browse to \Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook and export it to a .reg file. We'll use profile.reg for now. Make a copy so we can go back in case anything gets messed up.

Open profile.reg in notepad.

Now, you'll have to find the hexadecimal ascii value of your old profile. The gotchya is that each letter is separated by a null value.

Use the website https://www.binaryhexconverter.com/ascii-text-to-hex-converter to help convert your text to hex based ascii.

For example, my profile was nigelreed so I'm going to get the slashes before and after. Remember profiles are case sensitive. nigelreed is not the same as NigelReed

\nigelreed\

Results in 5c 6e 69 67 65 6c 72 65 65 64 5c

So in the profiles.reg file I'm going to be looking for any occurrence of 5c,00,6e,00,69,00,67,00,65,00,6c,00,72,00,65,00,65,00,64,00,5c

My new profile is just "nigel" so I'd want to go through and remove "72,00,65,00,65,00,64,00,", however my domain name is also nigelreed so I have to be careful not to remove the wrong ones. Look for your profile name between "5c" since this will most likely be your path.

Another gotchya is that this string of characters could be split over 2 lines.


96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,72,00,65,00,65,00,64,00,\
5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00

In the above example you can see that the slash is on the next line.

96,50,44,86,83,b8,7d,e5,22,aa,49,48,00,00,43,00,3a,00,5c,00,55,00,73,00,65,\
00,72,00,73,00,5c,00,6e,00,69,00,67,00,65,00,6c,00,\
5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,6f,00,63,00


So I just removed the "reed" portion. It doesn't matter how many characters are on a line so you can have more or less.


If your profile name is completely different, go back to the ascii text webpage and put in your new profile name and convert. Open another notepad and paste the hex ascii and insert your commas and null 00 values. You can then paste this between the 5c,00, values.

Let's say the new profile was "FredBloggs"

This converts to

46 72 65 64 42 6c 6f 67 67 73
F r e d B l o g g s

Now you need to make it look like this:

46,00,72,00,65,00,64,00,42,00,6c,00,6f,00,67,00,67,00,73,00


Then replace your old profile between the leading 5c,00 and trailing 5c in the path.


Once that is done, also make sure all your keys include HKEY_CURRENT_USER

[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook] [HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook\062512c81d7d644087505c2b8d9ad736]

etc.

You can press CTRL H in Notepad to go a global search and replace. Make sure your cursor is at the top of the file first.


Finally, you can now import the registry key. Run

regedit profile.reg


At this point go into Control Panel > Mail (Microsoft Outlook) and look at "Data Files". They should all now be pointing to your new location. If the data looks corrupt (possibly Chinese or odd ascii characters) then you messed up your profile.reg. Don't panic, see if you can fix it or copy over the backup file start again and re-import into the registry.


At this stage you may load Outlook. It may complain about passwords for IMAP/POP3 accounts so just go into Account Settings within Outlook and enter the password. Exchange accounts should popup with a password box.


Of course, YMMV but this did work for me without having to delete, recreate, or anything else with my .ost files.