Sunday, February 10, 2008

(Almost) Disable Outlook Express Folder Compacting

Ever since my last debacle with Outlook Express, it insists on asking my wife if she'd like to compact its folders. I definitely wanted to disable this mis-feature, but found no obvious way (read: menu item or dialog option) that does that.

I spent a few minutes searching for a solution on the Internet, and found the following FAQ. The behavior I encountered is definitely an OE bug: it's only supposed to ask the user to compact folders after being closed 100 times. The count isn't zeroed after the first time, which makes OE ask every time it's closed, even if the folders have been compacted.

The workaround is to reset the counter to zero in the registry:
  1. run regedit
  2. navigate to
    HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0
  3. edit the key "Compact Check Count" and set its value to zero.
I also exported the content of this key to a file, so that I can double click it and fix this again next time OE decides it's a good idea to compact folders.

I should probably automate this...


  1. Yes, please! :o) If you haven't already, but figured out a way to automate it, that would be wonderful! This is getting very frustrating...

  2. Well, I actually did automate this, but neglected to update...

    The idea is to periodically run the following command:

    regedit /s C:\path\to\compact-off.reg

    e.g. by setting up a scheduled task via Start->All Programs->Accessories->System Tools->Scheduled Tasks.

    I generated the registry file compact-off.reg like this:
    1. launch regedit
    2. export (File->Export) the registry keys under
    HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0
    3. open the file in notepad and remove all the keys except for "Compact Check Count", so that it looks like this:

    --- snip here ---
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0]
    "Compact Check Count"=dword:00000000
    --- snip here ---

    Note that I haven't tested this, but it should work.

    I use my backup software (Bacula) to run the command before the daily backup job. This also means the command is run by a different user, so that the path to the registry key looks different:
    HKEY_USERS\USER-ID\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0