Using Program Compatibility Mode

Windows XP includes a new feature, called compatibility mode, that allows Windows XP to act like a previous version of Windows, specifically Windows 95, 98, Me, NT, or 2000. The purpose of compatibility mode is to allow you to use older applications that might not work with Windows XP. When in compatibility mode, Windows XP acts like the previous version of Windows (which you select) so that the application is tricked into thinking it is installed on the correct operating system. This feature allows you to use older applications that are not 100 percent compatible with XP.

It is important to note that compatibility mode is intended for standard applications and even games. However, compatibility mode is not designed for use with programs that run portions of your system configuration. For example, you should not use this mode with antivirus programs that are not compatible with Windows XP because they may damage your system. The same is true for disk management utilities and backup software. In other words, if the application is used to manage the operating system or some portion of the operating system, it should not be used with compatibility mode—you need to upgrade and get the compatible version of the software.

Windows XP’s compatibility functions use application database files that interact with programs that you install. Because programs are outside of the operating system kernel, the application database files are used as a translator for the program and the operating system. There are four main application database files, which are

  • MigDB.inf  This database file is used for migration of applications from Windows 9x and Me. The database file is able to identify and flag programs that are incompatible or require an upgrade. This file is responsible for the message that may appear during installation telling the user that a certain application may not work correctly under Windows XP.

  • NTCompat.inf  This database file is used for upgrades from Windows NT and Windows 2000. It also provides incompatibility information concerning applications.

  • SysMain.sdb  This database file contains matching information and compatibility fixes.

  • AppHelp.sdb  This help file that can give the user clues about compatibility and how to resolve problems.

The SysMain.sdb is the primary database file that pulls the information from the MigDB.inf and NTCompat.inf files. It then looks for “matches” that can fix the incompatibility problems. These matches are often simple changes that allow Windows XP to give the program what it needs to function properly. The fixes, which are also called “shims,” are held in this database file, which contained about 200 at the time of XP’s release. Any application can use shims, but third-party developers cannot write new shims for Windows XP. This a security protection feature implemented by Microsoft. What you get out of the box is all you get.

With shims, Windows XP can invoke several compatibility modes. Essentially, a compatibility mode enables XP to use the identified shims for that category and possibly fix the application compatibility problems that the program has with Windows XP. These shims emulate the operating system that is needed by the program. For example, if an application is written for Windows 98, the shims can emulate the structure of the Windows 98 Registry, the location of certain system and user folders, file paths, and related changes in the operating system that the application would not be able to handle. The compatibility modes available in Windows XP are as follows:

Painful Lessons I’ve Learned: Compatibility Modes and Shims

start example

The compatibility modes and shims provided with Windows XP support around 100 of the most popular programs so they can work with Windows XP. However, they do not support everything and they certainly do not support any custom applications. However, you can still try to use one of these applications with compatibility mode and perhaps achieve good results. Be sure to use Windows XP's dynamic update and Windows update from time to time to ensure that your XP system has all of the available shims in its database. The main lesson to keep in mind here is that compatibility mode is not a fix for all problems—it can help you in some circumstances and with some applications, so don't assume that compatibility mode will come to your rescue every time.

end example

  • Windows 95  This mode emulates the Windows 95 environment.

  • Windows 98/Me  This mode emulates the Windows 98/Me environment.

  • Windows NT 4.0  This mode emulates the Windows NT 4.0 environment.

  • Windows 2000  This mode emulates the Windows 2000 environment.

  • 256 Colors  This mode reduces video card color to 256 colors for applications that can handle only 256 colors.

  • 640 ´ 480 Screen Resolution  This mode restricts screen resolution to 640 by 480 for applications that can handle only that screen resolution.

  • System Modes  A few other modes are available that most power users and administrators can invoke. These modes are used to limit or manage security and profiles for the user in order to run programs that require a limited security context. There is a Limited User Account mode available as well as a Profiles mode. You can invoke Profiles mode by using the QfixApp or CompatAdmin tools, which I’ll describe later in this section.

  • Custom Modes  You can create a custom mode for a particular application, based on the applications needs, using the CompatAdmin tool, which I explore later in this section.

Using the Program Compatibility Mode Wizard

You can easily configure a program to run in Program Compatibility mode with the help of the Program Compatibility Mode Wizard. The following steps show you how to use the wizard:

  1. Click Start | All Programs | Accessories | Program Compatibility Wizard.

  2. The Program Compatibility wizard appears. Click Next on the Welcome screen.

  3. In the next window, shown here, choose the desired radio button to locate the program. Make your selection and click Next.

    click to expand

  4. In the next window, choose the operating system that you want to emulate, such as Windows 95, NT 4.0, Windows 98/Me, and so on.

  5. In the next window, you can choose the screen resolution that the program works best under, or you can choose to disable Windows visual themes, which can interfere with some older programs. However, the settings here typically apply to games and educational programs that use a lot of graphics. If you do not want to use any of the settings, simply click Next without selecting any items.

  6. In the next window, click Next to test the compatibility settings with the program.

  7. The program opens and runs. Use the program for a few minutes to see whether the program works correctly. Then, close the program in order to return to the wizard.

  8. The wizard asks you if the program works correctly. If so, click Yes to continue, or No to try different compatibility settings. Click Next.

  9. The Program Compatibility Wizard collects information about your program and provides you a dialog box so that you can send compatibility information to Microsoft. Click Yes or No, then click Next.

  10. Click Finish. To change settings at a later time, simply rerun the wizard. You can now open the program and use it.

You can also avoid using the Program Compatibility Wizard and more easily apply a compatibility mode to a program. Just right-click the program’s executable file and click Properties. You see a Compatibility tab, shown in Figure 5-3. Simply choose to run the program in compatibility mode, choose an operating system to emulate, and apply any display settings as needed.

click to expand
Figure 5-3: Choose compatibility settings

Advanced Compatibility Settings

Aside from using the basic program compatibility settings to run an application, you can also configure some custom settings, or at least attempt to use a few compatibility tools that perhaps can make an application or program work with Windows XP. Keep in mind that the tools explored in the following sections are designed for administrators, and they can be complicated. However, with a little work, you may be able to solve the compatibility problems with that troublesome program.

Using QFixApp

QFixApp is a utility you can use to manually solve compatibility problems with applications by applying shims from an available database. QFixApp is not directly available from within Windows XP, but it is available in the Application Compatibility Toolkit, which is downloadable from http://msdn.microsoft.com.

Once you download and install the toolkit, you’ll see an HTML page that outlines the documents and tools in the toolkit. If you scroll to tools, you’ll see both the QFixApp and Compatibility Administration Tool. The QFixApp tool gives you control over an executable file by allowing you to examine the actual SysMain.sdb file and apply any shim to the executable. The Program Compatibility Wizard basically does this, but it applies the fixes based on one of the modes you select. With the QFixApp, you can apply a mode that you want, and you can manually overlay any additional fix that you want. This feature is quite helpful if you have applied a mode to an application, but you are still having a particular problem. If you can isolate the likely cause of the problem, then you can use QFixApp to apply that single fix while keeping the original mode application intact.

In short, you have total control over how the fixes are applied. The reverse is also true: If a fix is applied within a mode, you can individually remove fixes out of the mode for that application that may be giving you problems. Once you find the fix that works, you can apply it to the application, and you can also use a secondary tool, called the CompatAdmin.exe, so that you can apply the fix to other computers. The following steps show you how to use QFixApp.

Using the QFixApp Tool

  1. In the Application Compatibility toolkit, click the open link next to QFixApp.

  2. The QFixApp window appears, as shown in Figure 5-4. Browse for the executable file for the program you want to try to fix. If there are any existing fixes in the database for this application, you can choose to disable them by clicking the check box.

    click to expand
    Figure 5-4: Select the executable file

  3. On the Layers tab, you can choose to apply one of the existing modes to the application. For example, you can choose 256 color, Disable themes, NT 4 with Service Pack 5, Windows 98, and so on. If you don’t want to use an existing layer, just click the Fixes tab.

  4. In the Fixes tab, you see each individual fix that is available. If you click a fix, you can see a fix description toward the bottom of the window, describing what the fix should correct with the application. Work through the list, selecting the fixes that you want to apply.

  5. When you are ready to test the applications with the fixes you have applied, click the Run button. The application will open and you can use it as desired. Make note of what problems still exist and what problems were solved. You can then add or remove fixes as needed until you find the right combination for the application.

Using the Compatibility Administration Tool (CompatAdmin.exe)

The Compatibility Administration Tool (CompatAdmin.exe) is also a part of the Application Compatibility Toolkit, and as you’ll see, it performs many of the same functions as QFixApp. CompatAdmin.exe enables you to browse the database of fixes provided for applications in Windows XP. Then, you can assign fixes to those applications as necessary. Once you have applied the fixes to the application and the application is in good working order, you can then create a package with those fixes and deploy them to other Windows XP computers.

The CompatAdmin tool gives you a window interface, as you can see in Figure 5-5. The left pane lists all of the applications that are supported by fixes in Windows XP. As you scroll through the list, you can see there are quite a number of them. In the right pane, you can select one of the applications and see the executable file to which the fix applies and the actual compatibility fixes that are applied to this application by default. You also see the file matching results ensuring that the executable is the correct one for the application.

click to expand
Figure 5-5: CompatAdmin.exe

As you can see, there are a number of applications to view, and often a number of fixes for each specific application. If you are having a hard time browsing the applications and fixes, you can control how much information is displayed using the View menu. By default, the interface displays compatibility fixes, compatibility modes, Apphelp entries, and application patches. If you just want to see how patches are applied, you can clear the check next to the other items and the view will be a lot easier to work with.

You can perform several important actions with CompatAdmin. First, you can disable fixes. Keep in mind that the application databases provide information about applications for which Microsoft has determined fixes, as well as the fixes that should be applied. When a user invokes the Application Compatibility Wizard, the wizard attempts to match that application under the desired Windows version. However, you may need to change this behavior for a particular application. As you saw with the QFixApp tool, you can use the default fixes assigned by a database and overlayed with the chosen operating system, remove them and apply your own, or simply add to the existing one. With the CompatAdmin tool, you disable the default database fix for an application, and then use QFixApp or the CompatAdmin tool to create your own fix. Then that fix can be run or even deployed. Disabling a fix disables it on the local system and only disables it—it does not delete the fix so that you can easily reenable it later. The following steps walk you through this process.

Disabling an Application Using the Compatibility Toolkit

  1. In the Application Compatibility toolkit, open the CompatAdmin tool.

  2. In the CompatAdmin tool, browse the application list and select the application.

  3. In the right pane, right-click the executable (or actually any portion of the fix) and click Disable Entry. A red exclamation point now appears over the fix.

  4. You can reenable the fix at any time by right-clicking it and click Enable Entry.

One of the most powerful options that CompatAdmin provides is that you can create custom databases and custom fixes for the applications as needed. When you first open CompatAdmin, the tool creates a new database that appears in the lower-right portion of the screen. By default, this database is named New database(1).sdb. You can use the Database menu to rename the database as desired. You can also use the Database menu to perform a few additional actions that specifically allow you to create custom fixes for your new database, and you can even define your own compatibility mode.

To do this, select the database name in the lower-left corner, then open the Database menu. You see the option to create an application fix. The following steps show you how to use CompatAdmin to create custom fixes.

Using CompatAdmin to Create Custom Fixes

  1. In the Application Compatibility toolkit, click the link to open the CompatAdmin tool.

  2. Select the database name in the lower-left corner and click Database | Create New | Application Fix.

  3. In the Program Information window, give the fix a name and browse to select the program you want to fix. Click Next.

  4. The Compatibility Modes window appears, as you can see in the image shown next. If you choose the Apply Compatibility mode, you simply select the desired executable and assign one of the preconfigured modes, such as Windows 98, 256 colors, and so on. Essentially, this option performs the same actions as the Program Compatibility Wizard. To assign custom fixes to an application, choose the desired check boxes. You can choose to perform a Test Run, or simply click Next to continue.

    click to expand

  5. Select the desired fixes in the provided list, shown next. Click Next when you have selected all fixes that you want to apply.

    click to expand

  6. In the identification window, browse and select the files that identify the application. You can also click the Auto-Generate option, which tells the wizard to perform this action for you; this option is recommended. Make your selections and click Next.

  7. Perform a test run of the application by clicking the provided button, then click Finish when you’re done.

Aside from creating custom fixes from this window, you can also create your own compatibility mode. For example, suppose that your environment has several custom applications. You could create a custom fix for those applications by creating your own custom compatibility mode. Then you can more easily apply the mode to the desired applications. The following steps walk you through creating a custom compatibility mode.

Creating a Custom Compatibility Mode

  1. In the Application Compatibility toolkit, click the open link next to CompatAdmin.exe.

  2. Select the database name in the lower-left corner and click Database | Create New | Compatibility Mode.

  3. In the custom mode window, shown here, give the mode a name in the Name of the Compatibility Mode text box provided, then move any of the fixes you want for the mode to the Shims and Patches window to the Compatibility Fixes Available window. If necessary, you can click the Copy Mode button and select one of the existing modes (such as Windows 98, Windows 2000, 256 colors, and so on), then you can modify that mode as desired. Once you are finished, click Done.

    click to expand

Once you have created the custom fixes and/or compatibility modes for your custom database, you can then deploy that database to other Windows XP machines. Keep in mind, however, that the console doesn’t actually help you deploy the .sdb database file that you created. You save it in the console, and then simply copy the .sdb database file to the desired Windows XP computers. You can deploy the file using a simple network share, floppy disk, or whatever works best for you. The point is that the console doesn’t provide a delivery method. Once the file is located on the other XP machines, simply run the .sdb file on those machines and Windows XP will register the new database.




A+ Technician's on the Job Guide to Windows XP
A+ Technician's on the Job Guide to Windows XP
ISBN: 72226900
EAN: N/A
Year: 2003
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net