Export (0) Print
Expand All

Creating a Custom Installer for a ClickOnce Office Solution

You can create a custom installer program for your Office solution, instead of using the default installer that is created by the Office development tools in Visual Studio. For example, you may want to use a login script to start the installation for Office solutions, or use a batch file to install the Office solution without user interaction. These scenarios are ideal if the prerequisites are already installed on end user computers.

You can install the solution without opening a Microsoft Office application. Call the Office solution installer tool (VSTOInstaller.exe) as part of the process. By default, the tool is installed in the following location:

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

Alternatively, 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 VSTOInstaller.exe.

Applies to: The information in this topic applies to document-level projects and application-level projects for Microsoft Office 2013 and Microsoft Office 2010. For more information, see Features Available by Office Application and Project Type.

The following table explains the parameters that are available.

Parameter

Definition

/Install or /I

Install the solution. This option must be followed by the path of a deployment manifest. The path can be on the local computer, a universal naming convention (UNC) file share, or an HTTP/HTTPS web site. The path can be local (c:\foldername\publishfolder), relative (publish\), or a fully qualified location (\\servername\foldername or http://servername/foldername).

/Uninstall or /U

Uninstall the solution. This option must be followed by the path of a deployment manifest. The path can be on the local computer, a UNC file share, or an HTTP/HTTPS web site. The path can be local (c:\foldername\publishfolder), relative (publish\), or a fully qualified location (\\servername\foldername or http://servername/foldername).

/Silent or /S

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

/Help or /?

Display the Help information.

The following error codes are returned by VSTOinstaller.exe.

Error Code

Definition

0

One of the following scenarios occurred:

  • The VSTOinstaller Help was shown.

  • The solution was successfully installed.

  • The solution was successfully uninstalled.

-100

Check for the following possibilities:

  • Some command-line options were set multiple times. Ensure that each option is set only once.

  • At least one command-line option is not valid.

Type "vstoinstaller /?" to view the Help. For more information, see Creating a Custom Installer for a ClickOnce Office Solution.

-101

At least one command-line option is not valid. Type "vstoinstaller /?" to view the Help.

-200

The deployment manifest URI is not valid. Type "vstoinstaller /?" to view the Help.

-201

The solution could not be installed because the deployment manifest is not valid. For more information, see Deployment Manifests for Office Solutions.

-202

The solution could not be installed because the Visual Studio Tools for Office section of the application manifest is invalid. For more information, see Application Manifests for Office Solutions.

-203

The solution could not be installed because of a download error. Check the deployment manifest URI or network file location, and try again.

-300

The solution could not be installed because of a security exception. For more information, see Securing Office Solutions.

-400

The solution could not be installed.

-401

The solution could not be uninstalled.

-500

The operation has been canceled. One of the following scenarios occurred:

  • The solution could not be installed.

  • The solution could not be uninstalled.

  • The deployment manifest could not be downloaded.

Show:
© 2014 Microsoft