Link to home
Start Free TrialLog in
Avatar of timetracer
timetracer

asked on

Problem deploying VSTO addin in 64 bit Windows Terminal Server environment

Hi,

We are having a problem deploying a VSTO 2005 Second Edition Add-In and would appreciate any help with this.

We previously successfully deployed this add-in onto a 32bit Windows 2003 terminal service environment. By default VSTO installs on a per-user basis. But we got around this limitation by creating a custom CASPOL script which we ran after installation. This script removes the per user permissions and replaces them with per machine permissions.

I have included an example of this script below.

The client has now moved to a 64bit terminal services environment and our add-in is no longer working. The add-in is available but will not load, so our suspicions are that the problem is with the CASPOL script that it is no longer working.

We have tried editing our script so that it targets the Framework64 folder instead of Framework etc. without success.

Example script

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol.exe -u -q -rg "OurDll.a5376b32-bs02-4f7f-897e-025bd33c0fb8"

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -q -rg "OurDll.a5374b32-bf02-4f7f-897e-025re33c0fb8"

%windir%\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -q -ag My_Computer_Zone -url "OurUrl\*" Nothing -n " OurDll..a5374b32-bblas-4f7f-897e-025bd33c0fb8" -d "Code Group for Our App"

....etc...
 
I'd appreciate whatever help anyone can offer.

 Thanks,

Peter Evans
ASKER CERTIFIED SOLUTION
Avatar of Cláudio Rodrigues
Cláudio Rodrigues
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of timetracer
timetracer

ASKER

I'm setting up a Windows Server 2003 x64 testing environment without Terminal Server running at the moment.  I'll test the addins in that environment to see if the problem is with TS.

I've also tried running as a local admin and a domain admin account but it still doesn't work.

Thanks,

Peter Evans
In your windows server 2003 x64:
 Did you install Office and Add-in in compatible mode?
The location c:\program files(x86)
is the location where all 32-bit applications are installed in a windows 2003/2008 server.
Note: c:\program files is the location for 64 bit applications

Also your addin needs to target 32 bit only (x86 or any cpu will do). No reference must be made to any 64 bit library.
Hi everyone,


Thanks for the advice. After setting up a new testing environment I discovered that the problem was with the registration entry file I had created. I had not taken into account the fact that certain registry keys are redirected for 32 bit applications in 64 bit Windows. http://msdn.microsoft.com/en-us/library/aa384253%28VS.85%29.aspx

Having updated the Reg file, the problem is now resolved.

I think next time I'll set up the testing environment BEFORE rolling out to a client! :)

Below is an example of the Reg files I had been using to install out VSTO addin in a Windows Server 2003 32 bit Terminal Services environment and the equivalent script used to install in a 64 bit Terminal Services environment.


32 Bit Example:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}]
@="OurWordAddin  -- an addin created with VSTO technology"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,00,72,\
  00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,4d,00,69,00,63,00,\
  72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,68,00,61,00,72,00,65,00,64,\
  00,5c,00,56,00,53,00,54,00,4f,00,5c,00,38,00,2e,00,30,00,5c,00,41,00,64,00,\
  64,00,69,00,6e,00,4c,00,6f,00,61,00,64,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
  00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Program Files\\OurWordAddin"
"ManifestName"="OurWordAddin.dll.manifest"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\ProgID]
@="OurWordAddin"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\Programmable]

[HKEY_CURRENT_USER\Software\Classes\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\VersionIndependentProgID]
@="OurWordAddin"

[HKEY_CURRENT_USER\Software\Classes\OurWordAddin]
@=""

[HKEY_CURRENT_USER\Software\Classes\OurWordAddin\CLSID]
@="{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}"


[HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\OurWordAddin]
"Manifest"="C:\\Program Files\\OurWordAddin\\OurWordAddin.dll.manifest"
"FriendlyName"="OurWordAddin"
"Description"="OurWordAddin  -- an addin created with VSTO technology"
"LoadBehavior"=dword:00000003
"CommandLineSafe"=dword:00000001



64 Bit Example

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}]
@="OurWordAddin  -- an addin created with VSTO technology"

[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,00,72,\
  00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,4d,00,69,00,63,00,\
  72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,68,00,61,00,72,00,65,00,64,\
  00,5c,00,56,00,53,00,54,00,4f,00,5c,00,38,00,2e,00,30,00,5c,00,41,00,64,00,\
  64,00,69,00,6e,00,4c,00,6f,00,61,00,64,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
  00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Program Files (x86)\\OurWordAddin"
"ManifestName"="OurWordAddin.dll.manifest"

[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\ProgID]
@="OurWordAddin"

[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\Programmable]

[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}\VersionIndependentProgID]
@="OurWordAddin"

[HKEY_CURRENT_USER\Software\Classes\OurWordAddin]
@=""

[HKEY_CURRENT_USER\Software\Classes\OurWordAddin\CLSID]
@="{0DA740AD-63F3-478D-BA96-E3C36E57RDC6}"


[HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\OurWordAddin]
"Manifest"="C:\\Program Files (x86)\\OurWordAddin\\OurWordAddin.dll.manifest"
"FriendlyName"="OurWordAddin"
"Description"="OurWordAddin  -- an addin created with VSTO technology"
"LoadBehavior"=dword:00000003
"CommandLineSafe"=dword:00000001



Thanks again for your help.


Regards,

Peter Evans