If you have ever used ADFS and SharePoint, you know that the client integration experience leaves a lot to be desired. With the release of Service Pack 2 for the Office Client Suite and a bit of code, this exprerience is greatly improved. The ADFS team has provided the code for a simple yet powerful HttpModule that will allow for realm discovery between the Office client and the ADFS server. This HttpModule is placed in the web.config file on your SharePoint farm and can be added only to your Alternate Access Mapping that is using ADFS. You can find out more about this code and how it works at the ADFS team's blog here: http://blogs.technet.com/adfs/archive/2009/06/16/office-integration-with-moss-and-adfs.aspx
Now as with everything SharePoint it is good practice to roll changes into a SharePoint solution where possible. This ensures that all members of the farm are updated in parellel and any changes made can be easily rolled back. Attached to this blog is a C# project that will create a SharePoint solution to deploy the necessary assembly and web.config changes needed into your farm. Inside the project there is a file called ADFSTimerJob.cs and a constant called MY1_FLAG. This constant is used to identify which web.config to update on each server and can be changed to match your URL identifier. By default it uses the IIS description that you used when creating or extending your web application.
A few notes about the code: