如何为Office外接程序创建静默安装程序 [英] How to create silent installer for Office AddIn
问题描述
我有一个问题,无法为使用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.
我尝试了以下方法:
- 使用以下结构创建脚本.bat: 启动C:\ Windows \ ccmcache \ 3m \ Files \ setup.exe设置/S/V"/qn" 仅当单击安装程序时,才执行此方法.
- 使用"Visual Studio安装程序项目"创建一个.exe和.msi.有了这个 工具仅将安装文件复制到"C:\ Programs files"中,但是 加载项未加载到Outlook中.
- 我在项目中创建了一个类,用于在此之后创建自定义安装程序
Microdoft指南:
- 我下载了Advanced Installer 15.9,并创建了一个msi安装程序.到目前为止,这是一个更好的选择,但是在安装后首次打开Outlook时,再次出现安装屏幕,在这种情况下,如果我单击不要安装外接程序,请在Outlook中但禁用",并且如果要启用它,再次出现安装屏幕.
- 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.
推荐答案
您可以尝试以下方法:
-
在测试计算机上安装当前的MSI安装程序,打开Outlook并单击[安装]按钮;此操作将在以下注册表项下创建一些注册表项到安全性包含列表中:
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屋!