大网数据广告活动
安装更新与部署

An Installation Example

· 52CE 我爱测

This example illustrates how to create a simple Windows Installer package that installs an application.

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:

Planning the Installation

Importing a Blank Database

Specifying Directory Structure

Specifying Components

Specifying Files and File Attributes

Specifying Source Media

Specifying Features

Specifying Feature-Component Relationships

Adding Registry Information

Specifying Shortcuts

Specifying Properties

Importing the InstallExecuteSequence

Importing the InstallUISequence

Importing the AdminExecuteSequence

Importing the AdminUISequence

Importing the AdvtExecuteSequence

Adding Summary Information

Importing the User Interface

Validating an Installation Database

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。