|
Chapter 5: Installing, Uninstalling, and Managing Programs
Chapter 5 Installing, Uninstalling, and Managing ProgramsCompared to most earlier versions of Windows, the process of adding a new program is simpler and safer in Windows XP. For anyone upgrading from Windows 2000, the changes are mostly in the area of compatibility: Many programs that refuse to run properly under Windows 2000 (especially games) do better under Windows XP. On the other hand, programs that depend on virtual device drivers (VxDs) simply won't run under Windows XP (or Windows 2000, for that matter).If you're accustomed to Windows 95, Windows 98, or Windows Me, you'll notice two dramatic improvements in the way the operating system manages installed programs. Windows XP file protection prevents a rogue program from compromising your operating system by installing outdated or incorrect versions of crucial system files; and a greatly improved Add Or Remove Programs dialog box in Control Panel makes it easier to manage installed programs.
How User Rights Affect Program Setup OptionsWhen you attempt to install a program under Windows XP, your setup options depend on the permissions available to you through the account you used to log on. If you're running under an administrator account, you can install any program without restrictions (barring compatibility problems, of course). You can also choose to remove, modify, or repair that program at any time.
If you log on with a limited user account, however, you will be blocked from installing any program that can be run by other usersin other words, most programs. You can start the Setup program, but it will typically stop before successfully completing. Setup problems can be especially vexing with older applications that aren't certified for use with Windows 2000/XP. With most certified programs, the error message will be easy to understand, like the message that appears when a limited user tries to install a new copy of Microsoft Office XP.
Legacy applications that assume the user is running Windows 95/98 behave unpredictably when confronted with the more stringent security model of Windows XP. Like the following example, in these cases, the error message that appears when a limited user is blocked from setting up a program can be bafflingly irrelevant. The program might squawk when Setup tries to copy files to protected folders, where limited users lack appropriate permissions, or it might complain that it couldn't create a specific registry key or value. The only programs that can successfully be installed under a limited user account are those that copy files only to the user's profile, modify only registry settings in the HKEY_CURRENT_USER hive, and install shortcuts only for the currently logged-on user. If the Setup program tries to step outside these bounds, it fails. On a system that has been upgraded from Windows 2000, some accounts might belong to the Power Users group. This type of user account should be able to install most applications, but any Setup program that replaces operating system files or installs a service will fail; the system blocks access to these crucial parts of the file system and registry by all users except administrators. Security purists recommend that you log on for everyday computing tasks using an account in the Power Users group and use a computer administrator account only when the task requires it. The Power Users group is on the list of default groups in Windows XP Professional, but it's not available when you create or change an account using Control Panel's User Accounts dialog box. To work with this group, use the Local Users And Groups snap-in from the Computer Management console.
Installing ProgramsThe Add Or Remove Programs dialog box used in Windows XP is similar to the one introduced in Windows 2000 and dramatically different from its bare-bones predecessor in Windows 95/98 and Windows Me. As Figure 5-1 shows, the list of currently installed programs provides detailed information about each one, including the amount of disk space the program occupies, how often it's been used, and the date the program was last started. You'll also find buttons to uninstall or modify the program.Figure 5-1. Select each item in the list of currently installed programs for detailed information; note the link to additional support information. Indiscriminately installing software is rarely a good idea. A poorly written program can create system instabilities, cause conflicts with other programs, and impede system performance by using excessive amounts of RAM or CPU time. Before installing a new program, ask the following questions:
Installing 32-Bit Windows ProgramsVirtually all modern 32-bit Windows programs start the Setup process through a file called Setup.exe. Windows can track down the proper Setup file automatically when you use the Add New Programs tab on the Add Or Remove Programs dialog box, shown in Figure 5-2. Click the CD Or Floppy button to search removable media. Use the Browse button on the resulting dialog box to search in other locations (including your default downloads folder or a shared network folder).Figure 5-2. Click the CD Or Floppy button to quickly locate Setup files. Programs appear in the bottom of this window only when configured by a network administrator. On corporate networks, the Add New Programs tab also lists applications that a network administrator has made available to authorized users and groups over a network built around Windows 2000 or Windows .NET servers. Using Windows Installer, administrators can configure a program so that it installs automatically when the user needs it. A program installed this way will appear in either of these two configurations:
Installing and Running 16-Bit Windows ProgramsWindows XP does an impressive job of running programs that were originally written years ago for Windows 3.x. To run these older 16-bit programs under a 32-bit operating system, Windows XP launches a subsystema virtual machinethat mimics "386 enhanced mode" in the older Windows 3.x environment.Although Windows XP allows you to run these 16-bit programs, you'll encounter a few glitches:
Many 16-bit programs use the Windows 3.x-vintage Win.ini and System.ini files to store program-specific configuration information (some programs use private .ini files as well). Windows XP retains bare-bones copies of Win.ini and System.ini in the %SystemRoot% folder. If you encounter problems with a 16-bit application, you might find clues in these two files.
By default, Windows XP treats each running 16-bit application as a thread within a single virtual machine. If you're running multiple 16-bit applications, they share a common memory space, and a crash in one Windows 3.x-based application will typically bring down all the others with itcausing you to lose any unsaved information in all 16-bit applications. If you regularly run multiple 16-bit applications and one of them hangs or crashes frequently, you should run it in a separate memory space. To do so, follow these steps:
Figure 5-3. A program running in separate memory space can't cause problems for other 16-bit programs running at the same time.
Before deciding to run multiple 16-bit applications in separate virtual machines, you should weigh the tradeoffs. The downside is that this approach uses extra memory. (Windows Task Manager can help you measure the exact differences in RAM consumption for each scenario as explained in "Monitoring Memory Usage," page 231.) However, there are several benefits, including preemptive multitasking, better responsiveness, and the ability to run multiple instances of applications that normally do not allow you to do so. In general, this option is best reserved for mission-critical legacy applications.
Installing and Configuring MS-DOS ProgramsBy definition, all programs originally written for MS-DOS are 16-bit programs. As such, they run in a virtual machine alongside their 16-bit counterparts developed for Windows 3.x.To control the behavior of MS-DOS-based programs, you use a properties dialog box whose design hasn't changed much since Windows 95. Custom property settings for each program are stored in a shortcut file called a program information file (PIF).
You can create multiple shortcuts (PIFs) for a single MS-DOS program, each with its own custom settings, such as a default data file or working directory. When you right-click the icon for an MS-DOS executable file and make any changes to its properties, Windows saves your changes in the same folder, creating or updating a file with the same name as the executable file and the extension .pif. You can change the name of the shortcut file or move it to another folder. The PIF format is binary and can't be edited except through the properties dialog box. Right-click the icon for the MS-DOS program's executable file to display this dialog box, which adds four tabs containing options that are exclusively available to MS-DOS programs. Using the Misc tab, shown in Figure 5-4, for instance, you can disable Windows shortcut keys that conflict with shortcuts in the MS-DOS program. Other options on other tabs allow you to adjust the amount of memory allocated to a program, specify the program's initial display mode (full-screen or windowed), the icon associated with the program, and other options. Figure 5-4. The Font, Memory, Screen, and Misc tabs in this dialog box control settings that are exclusive to MS-DOS programs.
You can run any character-based program written for MS-DOS either in full-screen mode or in a window. (Graphics-based programs run only in full-screen mode.) If you run a program in full-screen mode, it looks exactly like it does when you run it under MS-DOS. If you run it in a window, it has a title bar, a Control menu, and other familiar window management features.
Running some MS-DOS programs properly might require that you change the system configuration used by the MS-DOS virtual machine. Two files, Autoexec.nt and Config.nt, serve this function in Windows XP. These two files serve a purpose similar to that of Autoexec.bat and Config.sys in MS-DOS and Windows 95/98, with several important differences:
Making a Program Available to All UsersMost of the time, when you install a Windows program from an administrator's account, its shortcuts are placed in %AllUsersProfile%\Start Menu\Programs, so that any user who wants to run that program can do so. Exceptionally well-written programs ask you whether you want to install the program for all users or only for the currently logged-on user. (This option is especially appropriate when you're installing a utility program that you don't want other users to be able to run.)What should you do when Setup installs a program only for the currently logged-on user? If you want other users to have access to the program, you have two choices:
To move the program's shortcut, follow these steps:
Use the same basic procedure, only in reverse, if you want to move a program shortcut or group from the All Users folder to your personal profile so that it is no longer available to other users. They will still be able to launch the program from the Run box or from an Explorer window, but you will have removed the most visible means of access to the program.
Forcing Older Programs to Run ProperlyWindows XP goes to heroic lengths to run many 32-bit Windows applications that refused to run under Windows 2000. The list of compatible software includes thousands of productivity titles and games. Unfortunately, not all programs that ran correctly under previous Windows versions will run under Windows XP, and some can cause serious problems. When you attempt to install a program that is known to have compatibility problems, Windows XP should display a message like the one shown here. Don't take this message lightly! If a patch is available, download and install it immediately. If no patch is available, do not install the program.If you run across a program that worked flawlessly under a previous Windows ver-sion but refuses to install or run under Windows XP, you might be able to run the program by adjusting its compatibility options. (This functionality was available in Windows 2000 via a Resource Kit utility called Apcompat.exe.) In Windows XP, you can reset compatibility options with a wizard or via the properties dialog box for a program shortcut. Both options have the same effectthey try to fool the underlying program into believing that it's running on an earlier version of Windows. This strategy is especially effective at getting around a Setup program that stops when it finds a Windows version number it doesn't understand.
To use the Program Compatibility Wizard, open the All Programs menu and then click Accessories. Click the program shortcut to launch the wizard and follow its step-by-step instructions. This is the only way to adjust compatibility settings on programs that are on removable media (including CDs) or on shared network drives. If you've successfully set up a program but it refuses to run, the easiest and fastest way to set compatibility options is to work directly with a program shortcut. Right-click the shortcut icon and choose Properties, and then click the Compatibility tab, as shown in Figure 5-5. Select the Run This Program In Compatibility Mode For check box, and choose one of the four available operating systems: Windows 95, Windows 98/Windows Me, Windows NT 4.0 (Service Pack 5), or Windows 2000. Use the Display Settings options to deal with programs that have video problems when run at higher resolutions and color depths. The Input Settings option (which appears only if you've installed Service Pack 1 for Windows XP) disables "advanced text services," which include handwriting recognition and speech recognition. Because advanced text services reduce performance, you should disable them for your older programs that can't use these cutting-edge input methods. Figure 5-5. Use these compatibility options to fool an older Windows program into running on Windows XP.
Managing Installed ProgramsIn its default view, the Add Or Remove Programs dialog box lists installed programs in alphabetical order by program name. If you're ready to do some spring cleaning, use the drop-down Sort By list in the upper right corner to sort by the date last used. Programs you haven't used recently are possible candidates for removal. If your goal is to free up disk space, sort by size; the biggest disk hogs appear at the top of the resulting list.For programs that include multiple Setup options, use the Add Or Remove Programs dialog box to rerun Setup and remove installed components or add options that you previously bypassed. Programs that use Windows Installer as their Setup engine typically offer a Change button for this purpose. Installer-based applications (including major Internet Explorer upgrades) may also offer a Repair option, typically buried under a Support link. In theory, Windows Installer should be able to detect problems caused by a damaged or deleted DLL and repair the component automatically when you run the applicationprompting you for installation media if necessary. Use the Repair button to completely refresh the set of installed program files and accompanying registry keys and values.
Uninstalling ProgramsTo remove an installed Windows program, open the Add Or Remove Programs dialog box from Control Panel, select the program's entry in the list on the Change Or Remove Programs page, and click the Remove or Change/Remove button.
Here are some basic facts you should know about uninstalling programs:
Managing Program ShortcutsDuring Setup, most Windows programs typically create one or more shortcuts on the Start menu (and occasionally on the desktop and Quick Launch toolbar as well). By tweaking shortcuts, you can control exactly how and when programs start up. Here are some useful improvements you can make to a generic program shortcut:
Figure 5-6. Tweak the properties of program shortcuts to enter command-line arguments, assign shortcut keys, and add ScreenTips.
Running a Program as Another UserIn some situations, you might not be able to run a program using the account under which you're currently logged on. This is most likely if you're logged on using an account in the Power Users group and the program you want to use requires administrative privileges. You have three options:
runas /user:username cmd
After you issue the command or activate the shortcut, you'll be prompted to enter the password for the specified user account. For security reasons, you cannot save the password with the shortcut. Note that the Runas command does not work with Microsoft Management Console (MMC) shortcuts; if you're logged in as a limited user and you want to start the Computer Management console using an administrator's account, right-click and use the Run As command on the shortcut menu.
The Run As menu choice works with most third-party programs and many Windows utilities and Control Panel options. (Hold down the Shift key when right-clicking a Control Panel icon to use this option.) A handful of applications that are started indirectly by Windows XP cannot be started with the Run As menu choice. You'll strike out if you try to use Run As with Windows Explorer, for instance. The option is also unavailable for desktop items created by the system and for objects in the Network Connections folder. Interestingly, a full menu of options is available when you press Shift and right-click any icon in the Printers And Faxes folder, and then choose Run As. Use this option if you're running under an ordinary user account and need to delete or pause items in the print queue that were created by another user.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||