Is there a way of stopping Windows Live Mail client repeatedly asking whether I want Outlook Express [sic] to compact my messages?
[p.s. please don't suggest that I just switch to a different mail client]
Judging from responses found online, it looks like there is a counter in the registry that counts up each time you close Windows Live Mail or Outlook Express. When the counter gets to 100, it prompts you to compact.
If something causes Windows Live Mail or Outlook Express to load itself into memory then close, the counter is incremented. For example, opening a file with extension .EML while WLM/OE are closed will do it. If another program queries your mail information, the same thing could happen and the counter will increment.
You could either go the trial and error route or the diagnostic route try to fix this.
If you want to be diagnostic, then grab a copy of Process Monitor and run it for a while, then search for anything that's hitting the registry key HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Outlook Express\5.0
, where "{GUID}" is your unique user GUID. It will probably be WLM/OE itself that's incrementing the counter in that registry key, but you can see what programs are active immediately before that happens.
If you want to use trial and error route, then it looks like people are blaming any or all of the following:
Windows Desktop Search. Go to Indexing Options and clear the checkbox for Outlook Express.
A particular keyboard driver, RAKDLL.DLL (IBM Rapid Access Keyboard).
Nero Scout. Disable indexing for *.eml, *.dbx, and *.nws.
Various anti-virus or anti-malware programs.