Wednesday, October 14, 2015

How To Change Default Data File (.OST) Location in Office 2013

To set the default location of an outlook data file you have to make a registry change.  Once you make the change, anytime you create a new data file, Outlook will put the data file in that new location. 
These instructions will work in prior versions of office as well but the path to the office key will be slightly different.

Change Default Data File Location in Outlook

1) Start - Regedit - Double-Click Regedit - Accept the Elevation Prompt - Drill Down / Navigate To: Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook
2) Right-Click Outlook Select New then String Value
3) Type “ForceOSTPath” without the quotes for the variable name and press Enter then Double-Click ForceOSTPath to Edit the string
4) Type the location you want your data files to use.  In my case it was D:\_Profile\Mail
5) Click OK {You can close Registry Editor now}   You will need to close Outlook in order for Outlook to use this new setting.  Now when you create a new OST data file Outlook will put it in the new location. Close Outlook and move any .PST files to the new location if you like.  

Move your OST to the new location…

Unfortunately to use the new location for your existing accounts, you will need to create a new profile.  When a profile is created, it saves the default location :(  To utilize the new location for the OST’s you need to let outlook recreate them.
6) Start - Control Panel - View By small Icons/ - Mail  (on Windows 8 you can also get there by just clicking Start - Type Mail - Click Settings - Click Mail)
This screenshot is Windows 8 but Windows 7 will be very similar  Now we will create a new profile and let the OST be rebuilt.
7) Click Add, Type in the Name you would like to give the profile (in my case I used “Dan Stolts”) then click OK
This will start the Auto account Setup wizard
8) Setup your first email account (Exchange or ActiveSync) by filling out your name, email address and password.
The account setup should be fully automated.
Notice if you like you can change the account settings or add another account from the wizard.  just click Finish to complete this account setup.
9) We need to set the new profile to be the default.   Do this by clicking the dropdown for “Always use this profile” and select the one we just created.
10) Cleanup - you can now delete the old profile if you like.  Deleting the profile will not remove the data files.  You will have to go back and do that manually.  By default the old data files were at %USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook (in my case that was: C:\Users\dstolts\Local Settings\Application Data\Microsoft\Outlook)
If you want to see the change you can drill down to the outlook data file settings from the mail control panel app Profile - Properties - Data files - Settings - Outlook Data File Settings
You can also get the information from the Account settings screen.  Profile - Properties - Email AccountsE-Mail Tab- Click the account and the location of the data file will be listed.
You can now go ahead and create additional accounts if needed.
If you want to copy the old OST file you can copy it to the new location as long as it is not in use.  If it is in use, try closing any apps that might have it open.  If that fails try restarting your computer and not running outlook until after you create the new profile.  I have not personally tried this so let me know if you have success. This may save you some time downloading a large mailbox.
Tip: If you find the OST is still put in the %USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook folder it is likely because there is already an .OST file of the same name in the destination folder. Try moving it somewhere else.  You can try copying it back once the account is successfully setup.