Office应用 VSTO软件的部署点滴

VSTO程序正确运行的前置条件

需要安装以下的内容

VS2008开发的组件

.net框架3.0/3.5

VSTO运行环境3.0

Office PIA安装程序[Office安装程序或独立的安装包安装,Office 2003/2007],Office2003版本需要特别注意,需要安装对应的补丁

 

VS2010开发的组件

.net框架4.0

VSTO运行环境4.0

Office PIA安装程序[Office安装程序或独立的安装包安装,Office 2007/2010版本]

 

简单的安装和注销方法

以a.vsto为例

安装

"%ProgramFiles%\Common Files\Microsoft Shared\VSTO\9.0\VSTOInstaller.exe" /i "%cd%\a.vsto"

"%ProgramFiles%\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /i"%cd%\a.vsto"

 

卸载

"%ProgramFiles%\Common Files\Microsoft Shared\VSTO\9.0\VSTOInstaller.exe" /U "%cd%\a.vsto"

"%ProgramFiles%\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /U "%cd%\a.vsto"

 

注册表的关联

VSTO程序安装后,在注册表HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\下有对应的组件的名称项[Word为例,Excel Outlook类同] ,其中的loadbehavior控制加载的行为,可以赋的值有:

0  Disconnected. The add-in is not loaded.

1  Connected. The add-in is loaded.

2  Load at startup. The add-in will be loaded and connected when the host application starts.

8  Load on demand. The add-in will be loaded and connected when the host application requires it (for example, when a user clicks a button that uses functionality in the add-in).

16  Connect first time. The add-in will be loaded and connected the first time the user runs the host application after registering the add-in.

一般常用的3,是1和2的或值,在组件异常后,这个值会自动变为2,此时需要手动或者程序处理设置,才能正常的看到组件的展现。

 

使用这些方法可以在一些出现问题的机器上检查组件不加载的原因

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值