Training
Certifications
Books
Special Offers
Community




 
Microsoft® Windows® XP Inside Out, Deluxe Edition
Author Ed Bott, Carl Siechert, Craig Stinson
Pages 1488
Disk 1 Companion CD(s)
Level Int/Adv
Published 10/16/2002
ISBN 9780735618053
ISBN-10 0-7356-1805-4
Price(USD) $59.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 


Chapter 5: Installing, Uninstalling, and Managing Programs



Chapter 5   Installing, Uninstalling, and Managing Programs

Compared 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 Options

When 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 users—in 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.

Click to view graphic
Click to view graphic

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.

Click to view graphic
Click to view graphic

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 Programs

The 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.

Click to view graphic
Click to view graphic

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:

  • Is it compatible with Windows XP? Look for a definitive statement of compatibility on the software package or on the software developer's Web site. Also, check Microsoft's database of compatible applications, available via the Find Compatible Hardware And Software For Windows XP link on the Help And Support Center's home page. For more information about compatibility issues, see the next section in this chapter.
  • Are any patches available? Checking for updates before installing a new program can spare you painful installation headaches.
  • Are there known problems with the program? A quick search through public newsgroups via Google's online Usenet archive (http://groups.google.com) might turn up valuable setup hints or convince you not to even try to install a particular program.
  • Can it be uninstalled easily? If the program's setup routine was written with a recent version of InstallShield, Wise Install, or Microsoft's Windows Installer, it will almost certainly include tools that allow you to remove it completely. The older the program, the more likely its uninstall procedure is incomplete.

Installing 32-Bit Windows Programs

Virtually 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).

Click to view graphic
Click to view graphic

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:

  • When an application has been assigned to a user, shortcuts to the program appear on the user's Start menu or desktop, and relevant file types are preassociated with the application. As soon as the user chooses the menu item, activates the shortcut, or opens an associated document, the application is installed. An application assigned to a specific user is available to that user wherever he or she logs on. An application can also be assigned to a computer, in which case the application is automatically installed when the computer starts up. (And if someone uninstalls the assigned application, it is automatically reinstalled at the next logon.)
  • An application that is published to a user is installed only when the user chooses that option from the list of available programs at the bottom of the Add New Programs window.

Installing and Running 16-Bit Windows Programs

Windows 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 subsystem—a virtual machine—that 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:

  • Most 16-bit programs do not support long file names. (Windows XP maintains the links between short and long file names, however, so that long file names are preserved when a 16-bit application modifies a file and saves it using the same name.)
  • In general, 16-bit applications do not run as fast as comparable 32-bit applications. The 16-bit programs are restricted to using a single thread, even on a multithreaded operating system such as Windows XP. And calls made by a 16-bit application must be translated for the 32-bit operating system. This translation process, called thunking, adds to execution time.
  • Some 16-bit applications require 16-bit device drivers, which are not supported in Windows XP. Applications that directly access hardware must supply a Windows XP virtual device driver and a Windows XP 32-bit device driver, or they won't run.
  • Dynamic link libraries (DLLs) written for 16-bit applications cannot be used by 32-bit applications, and vice versa. Because the setup program for most applications installs all the DLLs needed by the application, you won't be aware of this distinction most of the time. But if, for example, you have a macro written for Microsoft Word 6 (a 16-bit application) that accesses one or more DLLs, it won't work with Word 2002 (a 32-bit application).

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 it—causing 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:

  1. Create a shortcut to the program, right-click the shortcut icon, and then choose Properties.
  2. On the Shortcut tab, click the Advanced button.
  3. Select the Run In Separate Memory Space check box. (See Figure 5-3.)
  4. Click OK, and then close all open dialog boxes to apply the change.
  5. Click to view graphic
    Click to view graphic

    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 Programs

By 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.

Click to view graphic
Click to view graphic

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:

  • Autoexec.nt and Config.nt are located by default in the %SystemRoot%\System32 folder. (The corresponding files on an MS-DOS or Windows 95/98 machine are in the root folder of drive C.)
  • In Windows XP (as in Windows 2000), you can create custom versions of Autoexec.nt and Config.nt for specific applications. To associate your custom configuration files with a specific application, copy the default files to a separate location and edit them as needed. Next, open the properties dialog box for the MS-DOS program, click the Advanced button on the Program tab, and then enter the correct locations as shown below. (Note that this dialog box includes a Compatible Timer Hardware Emulation check box. This option imposes a performance penalty, so you should select it only if your application won't run with the box cleared.)
  • Click to view graphic
    Click to view graphic

  • Commands you enter in these two files affect only the MS-DOS subsystem. Many commands, such as Buffers and Break, are ignored, although they can be entered for compatibility purposes when an MS-DOS program insists that they be present. Windows XP includes its own versions of Himem.sys, Ansi.sys, Country.sys, and Setver.exe. Avoid using the follow-ing unsupported and unnecessary Windows 95/98 drivers in Config.nt: Emm386.exe, Smartdrv.sys, Ramdrive.sys, and Dblspace.sys/Drvspace.sys. Windows XP ignores all entries in Autoexec.nt except those defined by Set or Path commands, which it adds to the startup environment for that MS-DOS virtual machine.

Making a Program Available to All Users

Most 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:

  • Log on using each user account and rerun Setup. This option gives you the flexibility to make a program available to selected users, but it has one significant drawback: you have to remember to run that Setup program again every time you create a new user account.
  • For simple programs that don't require per-user settings to be added to the registry before running, you might be able to simply add a shortcut to %AllUsersProfile%\Start Menu\Programs. To ensure that a program is available to all current and future users, move the program's shortcut from your personal profile to the All Users folder.

To move the program's shortcut, follow these steps:

  1. Click the Start button, right-click the shortcut or group you want to move, and then choose Cut from the shortcut menu.
  2. Right-click the Start menu and then choose Explore All Users.
  3. Select the Programs folder, right-click, and then choose Paste.
  4. 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 Properly

Windows 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.

Click to view graphic
Click to view graphic

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 effect—they 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.

Click to view graphic
Click to view graphic

Figure 5-5.  Use these compatibility options to fool an older Windows program into running on Windows XP.

Managing Installed Programs

In 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 application—prompting 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 Programs

To 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:

  • Windows XP warns you if you attempt to remove a program while other users are logged on. For safety's sake, you should always completely log off any other user accounts before attempting to remove a program.
  • Most uninstall programs leave at least a few traces of the program behind, either inadvertently or by design. For instance, programs that create data files typically do not remove custom user settings and data files as part of the uninstall process.
  • You can only remove programs from the Add Or Remove Programs dialog box if they were originally installed with a Windows-compatible Setup program. Some programs (typically utilities) work by copying their files to a folder. In this case, you uninstall the program by manually removing its files and any shortcuts.
  • In some cases, a poorly written uninstall routine may leave a phantom entry behind in the list of installed programs, even after it has successfully removed all traces of the program itself. To remove an item from the list in this case, you can use Microsoft's unsupported (but highly recommended) Tweak UI utility. For details about Tweak UI, see "Customizing Windows XP with Tweak UI," page 327. You can also remove entries manually, using Registry Editor. Detailed instructions are available in Knowledge Base article Q247501, "How to Manually Remove Programs from the Add/Remove Programs List."

Managing Program Shortcuts

During 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:

  • Specify startup options. Create multiple versions of a program shortcut for special purposes. Many programs allow command-line arguments (the name of a file or startup folder, for instance) or startup switches that control default settings. With Microsoft Word, for instance, you can use the /T switch followed by a template name (don't add a space) to create a new document using that template. Open the shortcut's properties dialog box, and enter the arguments or switches immediately after the command name in the Target box, as shown in Figure 5-6. (Note in this example that we've also adjusted the Start In location and added a shortcut key.)
  • Click to view graphic
    Click to view graphic

    Figure 5-6.  Tweak the properties of program shortcuts to enter command-line arguments, assign shortcut keys, and add ScreenTips.

  • Assign a keyboard shortcut. Click in the Shortcut Key field and press a keyboard combination that you want to use for launching or switching to this program. The shortcut key you assign must consist of one character key (a letter, number, or symbol) plus at least two of the following three keys: Ctrl, Alt, and Shift. (If you press a character key only, Windows automatically adds Ctrl+Alt.) Shortcut keys work only when assigned to a program shortcut on the Start menu, the All Programs menu, or the desktop. The shortcut you define will not work if it conflicts with a combination used in the program whose window has the focus.
  • Add a ScreenTip. The text in the shortcut's Comments field appears in the ScreenTip when you hover the mouse pointer over the shortcut. You can add comments to your custom shortcuts to explain their purpose; if you would like to remove the comment text of an existing shortcut, delete it here.

Running a Program as Another User

In 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:

  • If Fast User Switching is enabled on your computer, click the Start button, choose Log Off, and then click the Switch User button. Log on using an administrative account and run the program. If the program will take some time to complete, you can allow it to remain running in the background while you switch back to your regular user account. Fast User Switching is not available on a Windows XP Professional machine that is joined to a domain. For more information, see "Configuring Fast User Switching," page 114.
  • For immediate access to a program without leaving your currently logged-on account, use the Run As option. The Run As menu choice is available when you right-click any shortcut or program icon. On some special-purpose shortcuts—most notably shortcuts placed on the All Programs menu by Microsoft Office—you have to hold down the Shift key as you right-click to display the Run As option. Select the option shown here, The Following User, and enter the user name and password of an account that has the desired permissions.
  • Click to view graphic
    Click to view graphic

  • Use the Runas command from a command window, from the Run dialog box, or in the Target field of a shortcut's properties dialog box to specify that you want a program to start with a specific user account. For instance, you can create a shortcut that opens a Command Prompt window using another user's permissions by typing the following syntax in the Target field of the shortcut's properties dialog box (substituting the actual user name, of course):
  • 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.



Last Updated: October 3, 2002
Top of Page