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\Fra mework\v2. 0.50727\ca spol.exe -u -q -rg "OurDll.a5376b32-bs02-4f7f -897e-025b d33c0fb8"
%windir%\Microsoft.NET\Fra mework\v2. 0.50727\ca spol.exe -m -q -rg "OurDll.a5374b32-bf02-4f7f -897e-025r e33c0fb8"
%windir%\Microsoft.NET\Fra mework\v2. 0.50727\ca spol.exe -m -q -ag My_Computer_Zone -url "OurUrl\*" Nothing -n " OurDll..a5374b32-bblas-4f7 f-897e-025 bd33c0fb8" -d "Code Group for Our App"
....etc...
I'd appreciate whatever help anyone can offer.
Thanks,
Peter Evans
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\Fra
%windir%\Microsoft.NET\Fra
%windir%\Microsoft.NET\Fra
....etc...
I'd appreciate whatever help anyone can offer.
Thanks,
Peter Evans
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
ASKER
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\Softwar e\Classes\ CLSID\{0DA 740AD-63F3 -478D-BA96 -E3C36E57R DC6}]
@="OurWordAddin -- an addin created with VSTO technology"
[HKEY_CURRENT_USER\Softwar e\Classes\ CLSID\{0DA 740AD-63F3 -478D-BA96 -E3C36E57R DC6}\Inpro cServer32]
@=hex(2):25,00,43,00,6f,00 ,6d,00,6d, 00,6f,00,6 e,00,50,00 ,72,00,6f, 00,67,00,7 2,\
00,61,00,6d,00,46,00,69,00 ,6c,00,65, 00,73,00,2 5,00,5c,00 ,4d,00,69, 00,63,00,\
72,00,6f,00,73,00,6f,00,66 ,00,74,00, 20,00,53,0 0,68,00,61 ,00,72,00, 65,00,64,\
00,5c,00,56,00,53,00,54,00 ,4f,00,5c, 00,38,00,2 e,00,30,00 ,5c,00,41, 00,64,00,\
64,00,69,00,6e,00,4c,00,6f ,00,61,00, 64,00,65,0 0,72,00,2e ,00,64,00, 6c,00,6c,\
00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Pr ogram Files\\OurWordAddin"
"ManifestName"="OurWordAdd in.dll.man ifest"
[HKEY_CURRENT_USER\Softwar e\Classes\ CLSID\{0DA 740AD-63F3 -478D-BA96 -E3C36E57R DC6}\ProgI D]
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar e\Classes\ CLSID\{0DA 740AD-63F3 -478D-BA96 -E3C36E57R DC6}\Progr ammable]
[HKEY_CURRENT_USER\Softwar e\Classes\ CLSID\{0DA 740AD-63F3 -478D-BA96 -E3C36E57R DC6}\Versi onIndepend entProgID]
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar e\Classes\ OurWordAdd in]
@=""
[HKEY_CURRENT_USER\Softwar e\Classes\ OurWordAdd in\CLSID]
@="{0DA740AD-63F3-478D-BA9 6-E3C36E57 RDC6}"
[HKEY_CURRENT_USER\Softwar e\Microsof t\Office\W ord\Addins \OurWordAd din]
"Manifest"="C:\\Program Files\\OurWordAddin\\OurWo rdAddin.dl l.manifest "
"FriendlyName"="OurWordAdd in"
"Description"="OurWordAddi n -- an addin created with VSTO technology"
"LoadBehavior"=dword:00000 003
"CommandLineSafe"=dword:00 000001
64 Bit Example
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar e\Classes\ Wow6432Nod e\CLSID\{0 DA740AD-63 F3-478D-BA 96-E3C36E5 7RDC6}]
@="OurWordAddin -- an addin created with VSTO technology"
[HKEY_CURRENT_USER\Softwar e\Classes\ Wow6432Nod e\CLSID\{0 DA740AD-63 F3-478D-BA 96-E3C36E5 7RDC6}\Inp rocServer3 2]
@=hex(2):25,00,43,00,6f,00 ,6d,00,6d, 00,6f,00,6 e,00,50,00 ,72,00,6f, 00,67,00,7 2,\
00,61,00,6d,00,46,00,69,00 ,6c,00,65, 00,73,00,2 5,00,5c,00 ,4d,00,69, 00,63,00,\
72,00,6f,00,73,00,6f,00,66 ,00,74,00, 20,00,53,0 0,68,00,61 ,00,72,00, 65,00,64,\
00,5c,00,56,00,53,00,54,00 ,4f,00,5c, 00,38,00,2 e,00,30,00 ,5c,00,41, 00,64,00,\
64,00,69,00,6e,00,4c,00,6f ,00,61,00, 64,00,65,0 0,72,00,2e ,00,64,00, 6c,00,6c,\
00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Pr ogram Files (x86)\\OurWordAddin"
"ManifestName"="OurWordAdd in.dll.man ifest"
[HKEY_CURRENT_USER\Softwar e\Classes\ Wow6432Nod e\CLSID\{0 DA740AD-63 F3-478D-BA 96-E3C36E5 7RDC6}\Pro gID]
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar e\Classes\ Wow6432Nod e\CLSID\{0 DA740AD-63 F3-478D-BA 96-E3C36E5 7RDC6}\Pro grammable]
[HKEY_CURRENT_USER\Softwar e\Classes\ Wow6432Nod e\CLSID\{0 DA740AD-63 F3-478D-BA 96-E3C36E5 7RDC6}\Ver sionIndepe ndentProgI D]
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar e\Classes\ OurWordAdd in]
@=""
[HKEY_CURRENT_USER\Softwar e\Classes\ OurWordAdd in\CLSID]
@="{0DA740AD-63F3-478D-BA9 6-E3C36E57 RDC6}"
[HKEY_CURRENT_USER\Softwar e\Microsof t\Office\W ord\Addins \OurWordAd din]
"Manifest"="C:\\Program Files (x86)\\OurWordAddin\\OurWo rdAddin.dl l.manifest "
"FriendlyName"="OurWordAdd in"
"Description"="OurWordAddi n -- an addin created with VSTO technology"
"LoadBehavior"=dword:00000 003
"CommandLineSafe"=dword:00 000001
Thanks again for your help.
Regards,
Peter Evans
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\Softwar
@="OurWordAddin -- an addin created with VSTO technology"
[HKEY_CURRENT_USER\Softwar
@=hex(2):25,00,43,00,6f,00
00,61,00,6d,00,46,00,69,00
72,00,6f,00,73,00,6f,00,66
00,5c,00,56,00,53,00,54,00
64,00,69,00,6e,00,4c,00,6f
00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Pr
"ManifestName"="OurWordAdd
[HKEY_CURRENT_USER\Softwar
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar
[HKEY_CURRENT_USER\Softwar
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar
@=""
[HKEY_CURRENT_USER\Softwar
@="{0DA740AD-63F3-478D-BA9
[HKEY_CURRENT_USER\Softwar
"Manifest"="C:\\Program Files\\OurWordAddin\\OurWo
"FriendlyName"="OurWordAdd
"Description"="OurWordAddi
"LoadBehavior"=dword:00000
"CommandLineSafe"=dword:00
64 Bit Example
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar
@="OurWordAddin -- an addin created with VSTO technology"
[HKEY_CURRENT_USER\Softwar
@=hex(2):25,00,43,00,6f,00
00,61,00,6d,00,46,00,69,00
72,00,6f,00,73,00,6f,00,66
00,5c,00,56,00,53,00,54,00
64,00,69,00,6e,00,4c,00,6f
00,00,00
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Pr
"ManifestName"="OurWordAdd
[HKEY_CURRENT_USER\Softwar
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar
[HKEY_CURRENT_USER\Softwar
@="OurWordAddin"
[HKEY_CURRENT_USER\Softwar
@=""
[HKEY_CURRENT_USER\Softwar
@="{0DA740AD-63F3-478D-BA9
[HKEY_CURRENT_USER\Softwar
"Manifest"="C:\\Program Files (x86)\\OurWordAddin\\OurWo
"FriendlyName"="OurWordAdd
"Description"="OurWordAddi
"LoadBehavior"=dword:00000
"CommandLineSafe"=dword:00
Thanks again for your help.
Regards,
Peter Evans
ASKER
I've also tried running as a local admin and a domain admin account but it still doesn't work.
Thanks,
Peter Evans