Search code examples
automationoutlookemail-client

Automatically setting up an Outlook IMAP account using a PRF file and disabling the 'remember password' setting


I am using a PRF file to automate the setup of a users IMAP email account in Outlook, as per the instructions and details mentioned here: http://technet.microsoft.com/en-us/library/cc179062(office.12).aspx. A GPO property has been setup to pre-configure the user's Outlook account with their basic details (using the above mentioned PRF file) when they log on to a computer for the first time. I would like it so that all the user has to do is enter their password in the username/password prompt when they first open Outlook. However, this isn't happening. Outlook is trying to connect to the mail server without prompting the user. I suspect it's because the account is being created with the option 'remember password' checked. Because there is no password entered, the connection is then failing.

How do I ensure this option is 'unchecked' by default when the email account is first setup?

There is a property in the PRF file in section 6 (Mapping for profile properties) which looks close to what I'm after:

RememberPassword=PT_BOOLEAN,0x6606

But I have no idea what to do with it. It's unfortunately not as straight forward as TRUE or FALSE.

I have also found the registry setting that stores the value of this 'remember password' option:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\[Profile Name]\9375CFF0413111d3B88A00104B2A6676\[Account Index]\IMAP Remember Passwd

But the GPO property that I have setup to set this value to 0 (off/false) when the user logs on to the computer is being overridden when the user starts Outlook and the PRF is loaded.

Am I looking at this the wrong way? Can you suggest another solution to achieve the same thing?

I am using Outlook 2007 on Windows 7, GPO via Windows Server 2008 and IMAP accounts (so no Exchange Server).


Solution

  • To make the process as easy as possible for the user, and to minimise user error, I was pre-populating the username in the PRF file. I wanted the username/password dialog to appear with the username already set.

    ;***************************************************************
    ; Section 5 - Values for each internet account.
    ;***************************************************************
    
    [Account1]
    ...
    [email protected]
    ...
    

    Don't do this. If set, Outlook attempts to connect to the mail server even though is doesn't have a password. It simply connects without asking... and subsequently fails.

    I have since removed this setting from the PRF file and the username/password dialog box is now displayed when Outlook first starts. The user can now enter their credentials BEFORE Outlook attempts to connect to the mail server. The downside, the users have to enter both username AND password, but I can live with that.

    The final result:

    ;***************************************************************
    ; Section 5 - Values for each internet account.
    ;***************************************************************
    
    [Account1]
    ...
    ;-- if the below line is uncommented, the password prompt is NOT displayed.
    ;-- with it commented, the user has to enter both username and password, but at least it works!
    ;[email protected]
    ...