Most modern software and game programs have automated setup processes, making it easy to install and run your programs. Resolving problems if automated setup fails or if a program does not run as expected is not so easy, however, which is why you need a strong understanding of how software installation works and the techniques you can use to diagnose and resolve any problems you encounter.
Software Installation: What’s Changed
Compared to earlier releases of Windows, the processes of installing, configuring, and maintaining software and game programs work differently in Windows Vista. Primarily, this is because of changes to:
The way accounts are used
The way User Account Control (UAC) works
The removal of the Add/Remove Programs utility
The way application access tokens are used
The way applications write to the system locations
Unlike earlier releases of Windows, Windows Vista has only standard user accounts and administrator accounts. When you log on to Windows Vista, you use one type of account or the other, removing the gray area between these two types of accounts that was previously available through the Power Users group. In Windows Vista, the Power Users group is included only for backward compatibility, and you should use it only when you need to resolve compatibility issues.
In Windows Vista, software installation, configuration, and maintenance are processes that require elevated privileges. Because of this, only administrators can install, configure, and maintain software. As discussed in Chapter 3, elevation is a feature of UAC. Because of UAC, Windows Vista is able to detect software installation. When Windows Vista detects a software-installation-related process, it prompts for permission or consent prior to allowing you to install, configure, or maintain software on your computer.
Windows Vista does not include an Add/Remove Programs utility. Instead, it relies completely on the software and game programs themselves to provide the necessary installation features through a related Setup or Autorun program.
Most programs created for Windows 95, Windows 98, Windows Me, Windows 2000, and Windows XP use setup.exe programs. Programs created for Windows Vista and later versions of Windows can use autorun.exe programs, particularly if those programs use current versions of Windows installers. For simplicity’s sake, I’ll refer to both Setup and Autorun programs as Setup programs.
Windows Vista also provides new architecture guidelines for software and game programs that fundamentally change the way software access tokens are used and the way software programs write to system locations. These changes are so far-reaching that software not specifically designed to support the new architecture guidelines is considered legacy software. This means there are two general categories of software that you can use with Windows Vista:
Windows Vista-compliant applications
Legacy applications
Any software written specifically for Windows Vista’s new architecture guidelines is considered a compliant application and can be certified as compliant with Microsoft. Applications certified as compliant have the Windows Vista-compliant logo. Applications written for Windows Vista have access tokens that describe the privileges required to run and perform tasks. Windows Vista-compliant applications fall into two general categories:
Administrator user applications
If an application requires elevated privileges to run and perform tasks, it is considered an administrator user application. Administrator user applications can write to system locations of the registry and filesystem.
Standard user applications
If an application does not require elevated privileges to run and perform tasks, it is considered a standard user application. Standard user applications should write only to nonsystem locations of the registry and filesystem.
Any application written for an earlier version of Windows is considered a legacy application. Legacy applications run as standard user applications and in a special compatibility mode that provides virtualized views of file and registry locations. When a legacy application attempts to write a system location, Windows Vista gives the application a private copy of the file or registry value. Any changes are then written to the private copy, and this private copy is in turn stored in the user’s profile data. If the application attempts to read or write to this system location again, it is given the private copy from the user’s profile.
The more you understand about software installation, the better prepared you’ll be to resolve problems you may encounter. Generally, the installation process starts when you trigger the AutoPlay or Autorun process. AutoPlay or Autorun in turn starts the software application’s Setup program. Setup is a program responsible for managing the installation process. Part of the installation process involves validating your credentials and checking the software’s compatibility with Windows Vista.
AutoPlay
AutoPlay options determine how Windows Vista handles files on CDs, DVDs, and portable devices. You can configure separate AutoPlay options for each type of CD, DVD, and media your computer can handle.
With software and games, you have the following AutoPlay options:
Install or run program Uses the program’s Autorun file to start installing or running the program automatically.
Open folder to view files using Windows Explorer Opens Windows Explorer so that you can browse the CD or DVD.
Take no action No action is taken when Windows Vista detects the CD or DVD. You must manually start the installation process.
Ask me every time Displays the AutoPlay dialog box, which prompts you for an action to take, as shown in Figure 4-1.
You can configure AutoPlay options for software and games by completing the following steps:
Click Start -> Default Programs.
On the Default Programs page in the Control Panel, click Change AutoPlay settings.
As shown in Figure 4-2, use the Software and Games list to set the default AutoPlay option to use.
Click Save to save your settings.
Autorun
When AutoPlay is enabled, Windows Vista checks for a file named Autorun.inf when you insert a CD or DVD into a CD or DVD drive. For software applications and games, this file identifies the Setup program and related installation parameters that should be used to install the software or game.
Figure 4-1.Selecting the Autorun or Setup option to install or run a program
Figure 4-2. Setting AutoPlay defaults
As Autorun.inf is a text-based file, you can view its contents in any standard text editor, such as WordPad or Notepad. Most Autorun.inf files are similar to the following example:
When AutoPlay triggers this Autorun.inf file, Windows Vista opens a file named Setup.exe when the CD or DVD is inserted into the CD or DVD drive. Because Setup.exe is a program, Windows Vista runs this program. The Autorun.inf file also specifies an icon to use, the status of the shell, and the program’s display name.
Although you’ll usually find that an Autorun.inf file opens and then runs a Setup program, this isn’t always the case. When AutoPlay triggers this Autorun.inf file, Windows Vista opens a file named Default.htm in Internet Explorer:
[autorun] OPEN=Autorun\ShelExec default.htm
As long as AutoPlay is enabled, you can retrigger the AutoPlay and Autorun processes by opening and then closing the drive bay.
With Windows Vista, only administrators can install software. This means you must either install software using an account with administrator privileges, or provide administrator permissions when prompted. Administrator privileges are required to change, repair, and uninstall software as well.
Most software applications have a setup program that uses Windows Installer, InstallShield, or Wise Install. The job of the installer program is to track the installation process and make sure the installation completes successfully. If the installation fails, the installer is also responsible for restoring your computer to its original state by reversing all the changes the Setup program has made. While this works great in theory, you can encounter problems, particularly when you are installing older programs. Older programs won’t have and won’t be able to use the features of the latest versions of installer programs, and as a result, they sometimes are unable to uninstall a program completely.
Because a partially uninstalled program can spell disaster for your computer, you should protect yourself by creating a System Restore checkpoint prior to installing any software or game. By creating a restoring point, as discussed in Chapter 21, you can be sure that you can fully recover your computer to the state it was in prior to installing the software or game. This way, if you run into problems, you’ll have an effective recovery strategy.
Before installing any software or game, you should do the following:
Check whether it is compatible with Windows Vista. You can determine compatibility in several ways. You can check the software packaging, which should specify whether the program is compatible or provide a Microsoft Windows Vista logo. Alternatively, you can check the software developer’s web site for a list of compatible operating systems.
Check the software developer’s web site for updates or patches for the program. If available, download the updates or patches prior to installing the software and then install them immediately after completing the software installation. Some software programs, such as Adobe Creative Suite and Microsoft Office, have automated update processes that you can use to check for updates after installing the software. In this case, after installation, run the software and then use the built-in update feature to check for updates or patches.
To avoid known compatibility issues with legacy applications, Windows Vista includes an automated detection feature known as the Program Compatibility Assistant. If the Program Compatibility Assistant detects a known compatibility issue when you run a legacy application, it notifies you about the problem and provides possible solutions for resolving the problem automatically. You can then allow the Program Compatibility Assistant to reconfigure the application for you. While the Program Compatibility Assistant is helpful, it can’t detect or avoid all compatibility issues. You may have to configure compatibility manually, as discussed in the “Configuring Compatibility for Other Software” section, later in this chapter.
You should not use the Program Compatibility Assistant or the Program Compatibility Wizard to install older virus detection, backup, or system programs. These programs may attempt to modify your computer’s filesystems in a way that is incompatible with Windows Vista, and this could prevent Windows Vista from starting.
Diagnosing a problem you are having as a compatibility issue isn’t always easy. For deeper compatibility issues, you may need to contact the software developer’s technical support staff. Some issues even support staff may not be able to resolve without time to study the problem. Consider the following:
When a computer manufacturer shipped computers with Windows XP, many recently purchased computers experienced infrequent “red screen” crashes. In contrast to blue screen crashes, which typically are related to operating system or hardware components, software drivers can cause a red screen crash. This problem was eventually pinpointed to an incompatibility between the firmware Basic Input Output System (BIOS) the computer was using and the software driver for certain graphics cards with a new 3D graphics feature. To resolve the problem, the computer’s firmware BIOS and graphics card driver both needed to be updated.
When a software manufacturer shipped a new version of its application suite, many recently purchased computers experienced problems starting and running the applications. After an automated update process had run, users were told their product licenses were invalid. This problem eventually was pinpointed to an incompatibility between the license-validation feature used by the application and the hard disk configuration being used by some customers. To resolve the problem, the software developers had to create an application path that let the license-validation feature work with hard disks that were mirrored.
In both examples, the compatibility issues were the direct result of technological innovation. In the first example, graphics cards implementing new 3D graphics features caused an unforeseen incompatibility with the computer’s firmware. In the second example, computers increasingly began shipping with mirrored hard disks, a feature that was previously used primarily on servers, and the license-validation feature was unable to recognize and validate the software applications across the mirrored disks.
Whether you are using your computer to create Word documents, view photos, or send email, you are running software that handles these tasks for you. Windows Vista’s job is to provide a framework for you to install, configure, and run your software.
Installing Software
Unlike earlier releases of Windows, Windows Vista doesn’t provide a tool for adding, reconfiguring, or removing software. Instead, it relies on the software itself to provide these features through a Setup program.
Most of the time installing and running your software using its Setup program is easy, and you can install your software from a CD or DVD by following these steps:
Insert the media disk into your computer’s CD or DVD drive.
If Windows Vista displays the AutoPlay dialog box, click Run Setup.exe or a similar option under Install or Run Program. When Setup starts, follow the prompts to install the software, and skip the remaining steps.
If Windows Vista doesn’t display the AutoPlay dialog box, click Start -> Computer. In the Computer window, double-click the CD or DVD drive.
If Windows Vista detected the software’s Setup program (using Autorun.inf), you are then prompted for permission or consent to run the Setup program.
If Windows Vista doesn’t detect the software’s Setup program, the contents of the disc are displayed in Windows Explorer. Double-click Setup.exe.
When Setup starts, follow the prompts to install the software.
Most software applications have a setup program that uses Windows Installer, InstallShield, or Wise Install. If the installation fails and the software has an installer, follow the prompts to allow the installer to restore your computer to its original state. Otherwise, exit Setup and then try rerunning Setup to either complete the installation or uninstall the program.
You can run installed software by selecting the software’s menu option or double-clicking its desktop shortcut. If you run into problems installing or running the software, be sure to read the sections of this chapter titled “Configuring Software Availability,” “Configuring Compatibility for MS-DOS or 16-Bit Software,” and “Configuring Compatibility for Other Software.”
However, not all programs have distribution media discs. If you download a program from the Internet, it’ll probably be in a ZIP or self-extracting executable file, and you can install the program by following these steps:
Start Windows Explorer.
Extract the program’s setup files using one of the following techniques:
If the program is distributed in a .zip file, right-click the file and select Extract All. This displays the Extract Compressed (Zipped) Folders dialog box. Click Browse, select a destination folder, and then click OK. Click Extract.
If the program is distributed in a self-extracting executable file, double-click the .exe file to extract the setup files. You’ll see one of several types of prompts. If you’re prompted to run the file, click Run. If you’re prompted to extract the program files or select a destination folder, click Browse, select a destination folder, and then click OK. Click Extract or OK as appropriate.
In Windows Explorer, browse the setup folders and find the program’s Setup.exe file. Double-click Setup.exe to start the installation process.
When Setup starts, follow the prompts to install the software. If the installation fails and the software used an installer, follow the prompts to allow the installer to restore your computer to its original state. Otherwise, exit Setup and then try rerunning Setup to either complete the installation or uninstall the program.
Please check back next week for the continuation of this article.