Summary:

Installing CRM Outlook 2010 plugin (classic) on Server 2008 with Terminal Services. When a user goes to file an email from an address that doesn't exist in CRM, they select a person / company and hit File. they are presented with an alert box with the above error message.

Symptoms:

SendWindowsMessage is called by a client side script on the File Email screen. This is a method in SageCrmOutlookAddIn2010.dll (CLSID {D7732C8F-E8AE-4155-8BBD-94510EEF3AD2}). If the plugin hasn't been installed correctly, you'll get the described error, even though the error seems to imply that it can find the plugin, just not the method.

The plugin install logs show that the installer was attempting to call CasPol and RegAsm in c:\users\username\windows\Microsoft.NET\Framework\v4.0.30319\. This is because Windows assumes that a user account won't have rights on the %SYSTEMROOT% directory. This causes the installer to partially fail, with no error messages.

Work around / Resolution:

Run the following on the command line when logged into the terminal server as an admin:


change user /install

This will allow you to re-run the Outlook plugin installer without using the virtualised directory.

You may also need to reinstall VSTO.

More Information:


If you want to install the missing components manually, you can run the following:


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe" -u -pp off -ag All_Code -url "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\*" FullTrust -n "CRM Outlook Plugin" -d "CRM Outlook Plugin" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_caspol.log""


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\SageCrmOutlookAddIn2010.dll" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_regasm.log""


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe" -u -pp off -ag All_Code -url "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\*" FullTrust -n "CRM Outlook Plugin" -d "CRM Outlook Plugin" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_caspol.log""


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\SageCrmOutlookAddIn2010.dll" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_regasm.log""


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\CasPol.exe" -u -pp off -ag All_Code -url "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\*" FullTrust -n "CRM Outlook Plugin" -d "CRM Outlook Plugin" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_caspol.log""


cmd.exe /c ""C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase "C:\Program Files (x86)\Sage\CRM Client\Outlook Plugin\SageCrmOutlookAddIn2010.dll" >> "C:\Users\adaptive\AppData\Local\Temp\7\crmclientinstall_regasm.log""