Overview of Installations
Even if you are unaware of what a setup is, chances are you have used one before. If you have ever installed a product onto your computer, you have seen a setup in action, from the end user’s perspective. The setup transfers files from the source medium to your local drive. It also makes the required registry entries, creates shortcuts, and registers COM servers. Setups commonly gather information about the target machine and the user.
Typical Elements of an Installation
Perform File Transfer
File transfer involves copying files from the source medium, such as a CD or a floppy disk, to a local drive on the end user’s machine. Depending on the configuration the end user chooses, all or only some of the files may be transferred to the local disk. During file transfer, a setup can display billboards that provide product information such as new features or usability tips. A status bar may also be displayed to show the progress of the file transfer process.
Display User Interface
The user interface of a setup provides information and setup configuration choices to the end user. Through the user interface an end user can choose to install only part of a product, choose to leave some files on the source medium, view a license agreement, or provide information to the installer that may be necessary to ensure the proper configuration of the installation. The user interface can be customized to meet whatever needs you may have. For example, you can prompt a user for a serial number before starting the installation if you want to protect your software against illegal use.
Create Shortcuts
Shortcuts are links to files and applications that can be created on the end user’s machine during a setup. Shortcuts are often placed on the desktop or the Start menu of the target machine to provide quick and easy access to a program or its files.
Register File Associations
If your product uses a distinct file type you need to register those file types on the end user’s system. For example, Notepad creates a file with a .txt extension. In order for a file type to be recognized by your end user’s system, it must be registered in the system registry. The process of registering a file type is handled during a setup.
Register COM, COM+, and DCOM Files
COM servers (such as ActiveX, COM, and COM+ files) require special registration so that applications can access the files’ interfaces. Traditionally, these EXEs, DLLs, and OCXs contained self-registration functions that could be invoked to register the files during installation. However, relying on self-registration can cause some problems: the end user cannot always be certain of what information is being registered or that the registry entries will be fully cleaned up when the file is uninstalled.
The solution provided by the Windows Installer service is to write the necessary registry entries during setup and then remove them when the COM component is uninstalled. This method helps to ensure that all the COM servers are registered in the appropriate way.
Register Product for Uninstallation
In order to uninstall a product, the operating system must know that the product is present. Therefore, a setup registers a product with the operating system so that it can be easily uninstalled. This registration is required for Windows logo compliance. Much of the information registered in this process is available to the end user through Add or Remove Programs in the Control Panel. For example, technical support contact information, product update information, product version, and product publisher information are all registered in this process.