How to create silent installer for Office AddIn

2019-08-09 02:14发布

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.

I tried the following methods:

  • 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.

VSTO installer

VSTO installer

1条回答
smile是对你的礼貌
2楼-- · 2019-08-09 02:35

You may try this approach:

  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

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

查看更多
登录 后发表回答