This example illustrates how to create a simple Windows Installer package that installs an application. The sample installs Notepad, a text editor included with Windows, and several text files describing events and admissions at the imaginary Red Park Arena.
The sample has the following specifications:
- The application is provided to users as a self-installing Windows Installer package that installs all the required files, shortcuts, and registry information.
- The installation package may present a UI wizard to the user during setup to collect user information.
- During setup, users have the option of selecting individual features to be installed to run-locally, to run-from-source, or to not be installed.
- One of the features can be presented to users as an install-on-demand feature.
- The same package uninstalls the application and removes all the application files and registry information from the user's computer.
- The package is prepared to receive a major upgrade that includes changing its product code.
To reproduce the example, you need a software tool capable of creating and editing a blank Windows Installer database. Several package creation tools are available from independent software vendors. A Windows Installer database editor called Orca is provided in the Windows SDK Components for Windows Installer Developers.
To complete the example, follow these steps:
Specifying Directory Structure
Specifying Files and File Attributes
Specifying Feature-Component Relationships
Importing the InstallExecuteSequence
Importing the InstallUISequence
Importing the AdminExecuteSequence
Importing the AdvtExecuteSequence
Validating an Installation Database
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.