none
Best way to do an unattended installation of a VSTO addin RRS feed

  • Question

  • I have a VSTO-based addin and I want to have an unattended installation (silent install) to mass-distribute it and install all required dependencies. What is the best way to do this? I see Window Installer (some dating to 2009) but no tutorial explaining how and no on talking about the current best way to do it. 
    • Edited by Zoldello Monday, December 9, 2013 7:32 PM
    Friday, December 6, 2013 7:01 PM

All replies

  • The tool you use to build your VSTO will have a large impact on the tool you use to build the setup application.  I'm working an Outlook COM AddIn, now, using Visual Studio 2012. 

    Using VS2012, the recommended solution is using the free InstallShield LE product.  It's working fine for me within an organization of several hundred installations.  The MSI form is working best for me.  I used the tips from this article:

    http://www.c-sharpcorner.com/UploadFile/cb88b2/simple-steps-to-create-setup-file-using-install-shield-le-fr/

    Using VS2010, you can try using the Windows Installer.

    http://msdn.microsoft.com/en-us/vsto/ff937654.aspx



    My MSI setup asks no questions.  But distribution and installation is performed using another product by the IT department.  It is that product that provides the "quiet install" option.
    Friday, December 6, 2013 8:34 PM
  • Hello Zoldello,

    There is no need to use InstallShield or any other 3rd party installers. The Deploying an Office Solution by Using ClickOnce article in MSDN states the following (describes the required steps):

    You can create a custom installer for your Office solution, instead of using the setup program that’s created for you when you publish the solution. For example, you could use a logon script to start the installation, or you could use a batch file to install the solution without user interaction. These scenarios work best if the prerequisites are already installed on end-user computers.

    As part of your custom installation process, call the installer tool for Office solutions (VSTOInstaller.exe), which is installed in the following location by default:

    %commonprogramfiles%\microsoft shared\VSTO\10.0\VSTOInstaller.exe

    If the tool isn't in that location, you can use the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTO Runtime Setup\v4\InstallerPath or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4\InstallerPath registry key to find the path to that tool.

    You can use the following parameters with VSTOinstaller.exe.

    /Install or /I

    Install the solution. You must follow this option with the path of a deployment manifest. You can specify a path on the local computer, a universal naming convention (UNC) file share, or an HTTP/HTTPS website. You can specify a local path (C:\FolderName\PublishFolder), a relative path (Publish\), or a fully qualified location (\\ServerName\FolderName or http://ServerName/FolderName).

    /Uninstall or /U

    Uninstall the solution. You must follow this option with the path of a deployment manifest. You can specify a path can be on the local computer, a UNC file share, or an HTTP/HTTPS website. You can specify a local path (c:\FolderName\PublishFolder), a relative path (Publish\), or a fully qualified location (\\ServerName\FolderName or http://ServerName/FolderName).

    /Silent or /S

    Install or uninstall without prompting the user for input or displaying any messages. If a trust prompt is required, the customization isn’t installed or updated.

    /Help or /?

    Display the Help information.

    It looks like you need to use the /Silent option with the VSTOinstaller.exe.

    P.S. Also you may be interested in the Office Solutions Development Overview article.

    • Proposed as answer by Marvin_Guo Wednesday, December 18, 2013 3:26 AM
    Saturday, December 7, 2013 8:13 AM
  • Thanks for your response. How do I get your methods to install the pre-requirsites like .NET and VSTO runtime?
    • Edited by Zoldello Monday, December 9, 2013 8:43 PM
    Monday, December 9, 2013 6:32 PM
  • How do you get the InstallShield LE product to install dependencies itself?
    Monday, December 9, 2013 9:00 PM
  • Hi,

    As Eugene said, I suggest you to publish VSTO add-in using ClickOnce deployment.
    >>How do I get your methods to install the pre-requirsites like .NET and VSTO runtime?
    For the .NET Framework, In Solution Explorer, and then, on the Project menu, click Properties. When the Project Designer appears, click the Publish tab. On the Publish page, click Prerequisites. Choose the .Net framework package.
    For the VSTO runtime, you need custom prerequisites package to add an installer package by using Package.xml
    http://msdn.microsoft.com/en-us/library/hh873130.aspx
    And you could also refer to the following link below:
    http://social.msdn.microsoft.com/Forums/windows/en-US/de554cf0-a489-4ab3-94b4-d850953e65c5/including-wmencoderlib-when-publishing-project?forum=winformssetup

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Edited by Marvin_Guo Wednesday, December 18, 2013 12:01 PM
    Wednesday, December 18, 2013 12:01 PM
  • Hi Zoldello,

    Of course you can use the list of prerequisites of the chosen installer (in your case - ClickOnce). But I am not sure that they will be installed silently (like your add-in does). That is why I would recommend deploying the .Net framework  and VSTO runtime before installing the add-in silently.

    Wednesday, December 18, 2013 12:20 PM