[RESOLVED] [2008] Outlook 2007 account settings
Hi,
The company I work for have different offices around Europe and every time I travel to one of these offices I need to change the SMTP setting for my mail account (POP3) in Outlook on my laptop. So I figured that I would write a simple application that could do this for me. So I wonder where Outlook stores the account settings? I've tried to use interop but the SMTP property of the Account class seems to be read-only.
1 Attachment(s)
Re: [2008] Outlook 2007 account settings
If you create a secondary profile (or one for each location) you can specify/setup each with the particular connection settings. In your Control Panel you can run the Mail applette and create the extra profiles. Click "Show Profiles..." and then you wil see a list of your original profile (usually named "Outlook" for the default first profile). Below that is a "Add..." button where you can create/add a new profile. You could click Copy... but I havent tested that method out for your situation yet but it may copy over all email account settings and then you can modify them independantly of the original profile. Oh and change the radio button selector to "Prompt for a profile to be used" (after the new profile is created) so when you start Outlook it will prompt for the profile to log on with.
Attachment 63972
One thing though is that with new profiles it will create a new .pst file in the "C:\Users\UserName\AppData\Local\Microsoft\Outlook" folder. This is not a big deal as you can go in to the Outlook Account Settings (Tools > Account Settings...) and in the Data Files tab add a secondary pst file pointing to your original pst file. Then remove the newly created empty pst file so you end up with a single centrally located pst file for all profiles.
You will have to set up all email accounts in the new profile that you want to have this common access under each profile as when your setting up the specific connection settings as per location etc. Probably name the profiles according to your clients locations for easier recognition.
Make a backup of your original pst file just in case of any confusion or error when switching data file locations. ;)
Let me know if it works out for you and sorry for the delay ;) :)
Re: [2008] Outlook 2007 account settings
Thanks Rob, it works well. Actually selecting Copy in the Mail control panel applet not only copied the different mail accounts I have set up but also used the same pst file. I will mark this thread as resolved even though I'm still interested in getting information about where and how Outlook stores account information when not connected to an Exchange server.
Re: [RESOLVED] [2008] Outlook 2007 account settings
Pretty sure it is stored in encypted format in the registry.
check this key
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook
Re: [RESOLVED] [2008] Outlook 2007 account settings
Thanks Matt! I was first surprised that I didn't have a subkey called Outlook under the Windows Messaging Subsystem\Profiles key, but I then realized it's simply because the subkeys there are the names of the different profiles I've created. I deleted the default Outlook profile after I'd created a bunch of new ones, just so that I could use a more descriptive name (I couldn't find a way to rename an existing profile).
The account information are there, except for the password they aren't actually encrypted they are just stored in REG_BINARY fields instead of REG_SZ text fields.
Now I'm just wondering if the account information always is stored under the same key name... Could anybody confirm that they have the following key in the registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676
Where "Outlook" is the default profile name. There should be a number of subkeys under this particular key, depending on how many accounts you have.
Re: [RESOLVED] [2008] Outlook 2007 account settings
Yes sir, I have that key with several subkeys that look to be hex numbers which seem to be the individual POP3 accounts.
Re: [RESOLVED] [2008] Outlook 2007 account settings
Re: [RESOLVED] [2008] Outlook 2007 account settings
Yes, its stored under the same key at least for Outlook 2003 and 2007. But with the data being encrypted I dont see how you will be able to change it effectivly unless you store the encrypted values under each setup and just switch out the secure values as needed. Also, not sure if changing the reg values will even take effect if Outlook is open and running. May need to restart Outlook in order to update the account new values.
May be worth a try but too much work IMO since the profile workaround seems to do all you need except allow dynamic switching without restarting Outlook.
Re: [RESOLVED] [2008] Outlook 2007 account settings
The information isn't encrypted (except for the password, which I don't need to change) the string "smtp.server.com" (or whatever) is simply stored in a REG_BINARY field (in Unicode format) instead of a REG_SZ field.
You are probably correct regarding the fact that updating the registry will probably not update the current Outlook session, need to test that, but I can always dynamically restart Outlook.
It all might look as a lot of work for something that several profiles in Outlook can handle but the thing is that all employees within the company must then create all of these profiles which might be overkill since some employees doesn't visit the other offices that very often. However we all use a tool that handles other business stuff and my idea was to add the feature to that so if/when you do visit another office you can simply change the SMTP setting via a popup menu of the tool already running in the system tray.
Re: [RESOLVED] [2008] Outlook 2007 account settings
You know there is also a Profile utility for deploying profiles from MS.
I have a link to it in my Outlook FAQ.
Re: [RESOLVED] [2008] Outlook 2007 account settings
When I got a new PC last time, I used this software
http://www.backsettings.com/outlook-backup.html
The free version doesn't do the following things the pay version does.
Does not restore Microsoft Outlook signatures and stationery.
Does not restore Internet Explorer favorites.
Compressed backup password protection disabled.
Everything else went fine.
Re: [RESOLVED] [2008] Outlook 2007 account settings
I wrote a pst backup utility a couple of years ago. Perhaps I should extend/update it and put it on my site for sale with a cheaper price too :D
Joacim, you can use the namespace logon method to relogin under a different or even same profile (for a refresh if you do a logoff first) if you are going to write some utility for this.