共用方式為


Authoring a Windows Installer Package

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Data drives the Windows Installer model. Rather than writing a procedural script to copy files and write registry entries, for example, you author rows and columns in database tables that contain file and registry data.

Database Entries

To install a VSPackage, a Windows Installer package must contain database entries to perform the following tasks:

  • Search the system to locate the versions of Visual Studio your VSPackage supports (using Windows Installer tables that include AppSearch, CompLocator, RegLocator, DrLocator, and Signature).

  • Cancel the installation if no supported version of Visual Studio is installed or if another system requirement of the VSPackage is not met (using the LaunchCondition table).

  • Install the VSPackage and dependent files (using the directory, component, and file tables).

  • Add appropriate information for the VSPackage to the registry (using the Registry table).

  • Integrate the VSPackage in Visual Studio by calling devenv.exe /setup (using the CustomAction table).

    For more information, see Windows Installer.

Setup Tools

A variety of third-party setup tools provide a development environment for Windows Installer packages. Two free tools are the following:

  • InstallShield Limited Edition

    You can get a limited version of InstallShield through the Visual Studio New Project dialog. Expand Other Project Types and then select Setup and Deployment. Select the InstallShield template.

  • Windows Installer XML Toolset

    The Toolset builds Windows Installer packages from XML source files. The Toolset is a Microsoft open-source project. You can download the source code and executables from http://sourceforge.net/projects/wix.

    For commercial products that integrate into Visual Studio by using the Visual Studio SDK, see https://marketplace.visualstudio.com/.

See Also

Installing VSPackages With Windows Installer