如何为Office外接程序创建静默安装程序 [英] How to create silent installer for Office AddIn

查看:478
本文介绍了如何为Office外接程序创建静默安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,无法为使用C#中的VSTO开发的Outlook加载项创建静默安装程序.安装程序是由clickOnce生成的outlookaddin.vsto.此加载项将由SCCM在多台计算机上发布,我需要静默安装,但是当软件包到达最终设备时,出现"Microsoft Office Customization Installer"屏幕,询问安装确认. 我需要创建带有某种自动点击"功能的脚本,以自动点击安装"和关闭"按钮,或者创建不同的vsto安装程序.

I have a problem to create a silent installer for Outlook Add-In developed using VSTO in C#. The installer is a outlookaddin.vsto generated by clickOnce. This add-in will be published by SCCM in several computers and I need a that the installation be silently but when the package reaches to the final device appear the screen of "Microsoft Office Customization Installer" asking confirmation for install it. I need create a script with some kind of "autoclick" for clicking automatically on "Install" and "Close" buttons or create a different installer of vsto.

我尝试了以下方法:

  • Create script .bat with the following structure: START C:\Windows\ccmcache\3m\Files\setup.exe setup /S /V"/qn" Whit this method only the installer is executed as if click on it.
  • Create a .exe and .msi with "Visual Studio Installer Project". With this tool only the installation files were copied in "C:\Programs files" but the add-in is not loaded in outlook.
  • I made a class in the project for create a custom installer following this guide of Microdoft: https://docs.microsoft.com/en-us/visualstudio/deployment/walkthrough-creating-a-custom-installer-for-a-clickonce-application?view=vs-2015 This method not work, when run throws this error: "Could not download manifest. Error: Value does not fall within the expected range".
  • I downloaded Advanced Installer 15.9 and created a msi installer. This was the better option until now but when open outlook the first time after install it, appear again the screen of installation, in this case if I clicking on Don't install the add-in follow in outlook but disabled and if I want to enable it, appear the installation screen again.

我添加了安装屏幕的图像.

I add the image of the installation screen.

推荐答案

您可以尝试以下方法:

  1. 在测试计算机上安装当前的MSI安装程序,打开Outlook并单击[安装]按钮;此操作将在以下注册表项下创建一些注册表项到安全性包含列表中:

  1. on a test machine install your current MSI setup, open Outlook and click on [Install] button; this operation will create some registry entries to security inclusion list under the following registry key:

HKEY_CURRENT_USER \ Software \ Microsoft \ VSTO \ Security \ Inclusion

HKEY_CURRENT_USER \ Software \ Microsoft \ VSTO \ SolutionMetadata

导出上述注册表项,并导入到Advanced Installer设置项目的"Registry"页面中;重建MSI;安装MSI

export the above registry key and import into "Registry" page of your Advanced Installer setup project; rebuild MSI; install MSI

这篇关于如何为Office外接程序创建静默安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆