An Office 2007 or Office 2003 application that is running on an RD Session Host server may close unexpectedly in Windows Server 2008 R2

Applies to: Windows Server 2008 R2 DatacenterWindows Server 2008 R2 EnterpriseWindows Server 2008 R2 Foundation

Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
When you run a Microsoft Office 2007 or Microsoft Office 2003 application on a Remote Desktop Session Host (RD Session Host) server that is running Windows Server 2008 R2, the application may close unexpectedly. For example, the application may close unexpectedly when you try to send a Word document to Outlook.

Symptoms


When you run a Microsoft Office 2007 or Microsoft Office 2003 application on a Remote Desktop Session Host (RD Session Host) server that is running Windows Server 2008 R2, the application may close unexpectedly. For example, the application may close unexpectedly when you try to send a Word document to Outlook.

Cause


This issue occurs because of the Tsappcmd.dll component. This component makes changes to the Import Address Table (IAT) for applications that are not Terminal Server aware in order to prevent viruses or malware from maliciously hooking the application. Because of this, the application may experience temporary memory corruption because of the order in which the modules are loaded. Office 2007 and Office 2003 do not contain the TSAWARE header flag. This flag notifies the server that the application is Terminal Server aware.

Workaround


Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.To work around this issue, use one of the following methods.

Method 1

Disable DEP for the application in question. To do this, follow these steps:
  1. In Control Panel, click System, and then click Advanced system settings. The System Properties dialog appears.
  2. In the Performance section, click Settings. The Performance Options dialog opens.
  3. On the Data Execution Prevention tab, select Turn on DEP for all programs and services except those I select, and then click Add.
  4. Select the executable file of the problematic application.
  5. Click Apply, and then restart the system.

Method 2

Disable IAT. To do this, follow these steps:
  1. Start Registry Editor. To do this, click Start, click Run, type regedit, and then click OK.
  2. Locate and then right-click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
  3. Click New, and then click DWORD (32bit) Value.
  4. Type IAT to name the new DWORD value, and then press Enter.
  5. Right-click IAT, click Modify, and then type 1 in the Value data box.
  6. Restart the system.

More Information


For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2279689 Access Violation of BEX or APPCRASH occurs on Windows Server 2008 R2 with Terminal Service
For more information about multithreaded Terminal Server applications crashing in Widows Server 2008 R2, visit the following website:

For more information about the /TSAWARE (Create Terminal Server Aware Application) option, visit the following Microsoft Developer Network (MSDN) website: