Professional Documents
Culture Documents
0 Technical Articles
Microsoft Corporation
December 1999
Summary: This article lists the basic steps involved in creating, configuring, and
building a Microsoft Windows Installer package (.msi) file with Microsoft Visual Studio
Installer. (14 printed pages)
Microsoft® Visual Studio® Installer is a graphical tool that simplifies the creation of
application setup programs for distribution to single user or enterprise-wide
desktops. Setups created with the Visual Studio Installer provide advanced
capabilities such as centralized distribution for maintenance and updates, application
self-repair, and powerful installation rollback facilities.
Visual Studio Installer setups are based on the new Microsoft Windows® installer
technology. The Windows installer reduces the total cost of ownership (TCO) for
customers by enabling them to efficiently install and configure applications. The
Windows installer is part of the Windows 2000 and Zero Administration Windows
(ZAW) efforts to reduce the overall cost of deploying, using, and managing desktop
computers.
For more information on the Visual Studio Installer, visit the Visual Studio Web site,
http://msdn.microsoft.com/vstudio/downloads/tools/vsi11/default.aspx. In addition,
you can read the Visual Studio Installer documentation.
Tutorial
This tutorial lists the basic steps involved in creating, configuring, and building a
Microsoft Windows Installer package (.msi) file with Microsoft Visual Studio Installer.
An .msi file is a storage file containing the instructions and data required to install an
application.
This tutorial will show how to author an .msi file to configure the installation of a
Visual FoxPro® application. It will also show how to launch the .msi file and install the
application.
To author and launch an .msi file with Visual Studio Installer, complete these tasks:
1. Open Visual Studio Installer and create an installer project as part of a Visual
Studio solution.
2. Add files to the installer project and configure file properties.
3. If desired, configure the project properties.
4. If desired, establish how to modify the target machine system registry when
your product is installed and configure registry properties.
5. If desired, establish how the target machine operating system will handle your
installed document types, MIME types, COM objects, and type libraries, and
configure properties for each of these objects.
6. If desired, control and customize the installation dialogs presented when your
users run the installer package file to install, repair, or uninstall your product.
7. Add merge modules to the project.
8. Build the installer package file.
9. Test the installer package file.
10. Distribute the application.
The data used by the application is in a folder named Data. This folder is a subfolder
of the main application folder.
Make a note of the directory in the Location textbox. This is where the
application installer file you create will be located. You can change the
location for your project if you like.
7. Choose Open.
Figure 1. Creating a new Visual Studio Installer project
Visual Studio Installer creates your installer project. The Project Explorer displays
your installer project hierarchy. You can expand the Target Machine node to start
setting up the configuration of your installed product on the target machine.
For more detailed information about creating installer projects, see Creating and
Opening Installer Projects.
The File System editor displays the file(s) you added in the folder you
selected. The files are also listed in the installer project Files node in the
Project Explorer.
This places a shortcut to the file VFPVSIDemo.exe on the user’s Start menu.
See the following topics for more detailed information about working with files in an
installer project:
The Project Properties dialog box appears. You can view or change the project
properties in the Project Properties dialog box.
For information about the different project properties and how to modify them, see
Project Properties Dialog Box.
1. In the Project Explorer, expand the Target Machine node under your
installer project.
2. Double-click Registry in the Target Machine node.
The Registry editor appears.
See the following topics for more detailed information about manipulating the target
machine registry:
Adding and deleting registry keys and Manipulating the Target Machine
values, as well as setting registry values Registry
1. In the Project Explorer, expand the Target Machine node under your
installer project.
2. Double-click Associations in the Target Machine node.
Working with document types, Setting File, MIME, COM Object, and
extensions, verbs, MIME types, COM Type Library Associations
objects, and type libraries
See the following topics for more detailed information about installation user
interface dialogs:
• VFP6RUN.MSM
• MSVCRT.MSM
• OLEAUT32.MSM
The files MSVCRT.MSM and OLEAUT32.MSM ship with Visual Studio Installer. You can
find these and other merge modules in the directory c:\Program Files\Microsoft Visual
Studio\Common\Tools\VSInst\BuildRes.
Save the file VFP6RUN.MSM (available from the sample download at the top of this
article) to the directory with the other merge modules.
The VFP6RUN.MSM merge module installs and properly registers the Visual FoxPro
6.0 run-time libraries. Refer to Using Microsoft Visual Studio Installer for Distributing
Visual FoxPro 6.0 Applications for a reference guide to other available merge
modules that ship with Visual Studio Installer.
—or—
Note For information about these options, see the Build Tab (Project
Properties Dialog Box) topic.
3. With the installer project selected in the Project Explorer, select Build from
the Build menu.
You should see the message Solution Update Succeeded in the Status Bar if the
project built successfully. If errors occurred, you should see them in the Task List.
4. In the Select Installation Folder step, you can choose to install the
application in the default directory or change the directory.
Figure 6. Select Installation Folder step in VFPVSIDemo Setup Wizard
For more information about these Windows installer requirements and launching an
installer package file, see Launching an Installer Package File.
Note If you set the Build Type as Installer with Windows Installer Loader in
the previous step, you should run SETUP.EXE file to test your setup.
Run the application to confirm the installation succeeded. If you accepted the
defaults, the application is installed in the directory C:\Program Files\VFPVSIDemo
and the data is installed in C:\Program Files\VFPVSIDemo\Data.
1. Locate the VFPVSIDemo.msi file. If you accepted the default Location when
you created the project, it will be in a directory such as Visual Studio
Projects\VFPVSIDemo\Output\DISK_1\.
2. To launch the installer, double-click the file VFPVSIDemo.msi.
3. Open the VFPVSIDemo Setup Wizard. Choose RepairVFPVSIDemo to
reinstall the application. Choose RemoveVFPVSIDemo to uninstall the
application. Then choose Finish.