Creating Compatibility Fixes

   

Independent software vendors (ISVs) have long made it a practice to write their products to run as well as possible on the customer's computer. To accomplish this end, they have looked for ways to work with the operating system to perform their tasks in the most efficient ways possible. The result is an application that is highly optimized for the version of Windows that it was originally written for. Application compatibility issues can arise when a customer tries to run a favorite program on a newer version of Windows than the application was originally written for. This might be particularly true with the move to Windows XP because it's built upon the foundation of Windows NT and Windows 2000.

Many ISVs have been developing applications for the home user market, and for years that focus has meant supporting Windows. Windows NT and Windows 2000 have been seen as business operating systems, so some application developers have chosen to write their programs solely for Windows 95 and Windows 98. When applications are moved to Windows XP, they will encounter new ways of doing familiar tasks. Some of these differences will be a result of the new features of Windows XP, but some will be a result of the more stringent rules laid down by the Windows NT heritage of Windows XP.

Applications that worked on other versions of Windows might fail to function properly on Windows XP. This applies mostly to applications written for Windows 95 and Windows 98, but applications written for Windows NT or Windows 2000 might also be affected. This can happen for any of the following reasons:

  • The application refuses to run when Windows reports new, higher version numbers . Often the application will work well on the new version of Windows if the user can get past this block in the application.

  • The application calls older versions of Win32 API functions that return unexpected values on machines with large amounts of resources such as disk free space.

  • The application expects older formats of Windows data.

  • The application expects user information, such as personal and temporary folders, to be in specific locations or specific formats.

Understanding the Application Compatibility Process

Windows XP and Windows Server 2003 introduced a new level of commitment to application compatibility. There are methods within the user interface to correct application compatibility issues, as well as more advanced tools meant for developers or administrators. All of these technologies depend on compatibility information gleaned from the files on the local computer that are then matched to data in a system-level compatibility database. This matching information is used to uniquely identify an application that might require additional support from the operating system to function correctly.

Three fundamental levels of compatibility can be applied, depending on the scenario:

  • Compatibility fix.

    This level of compatibility support provides a shim , or small piece of code that corrects a particular behavior that results in a compatibility issue. Typically, a compatibility fix addresses only one compatibility issue.

  • Compatibility mode.

    A compatibility mode is a collection of several compatibility fixes that are commonly applied together. An example would be the application of the Windows 98 compatibility layer through the user interface. The Windows 98 compatibility layer is a compatibility mode; that is, it comprises multiple compatibility fixes that are required to support most applications written specifically for Windows 98.

  • AppHelp.

    An AppHelp message is the final option when a compatibility issue cannot be completely resolved. Simply put, an AppHelp message is a message that will be triggered whenever you attempt to run an application with a known unresolved compatibility issue. AppHelp messages range from advisory in nature, wherein the user is simply notified that the program might not support all of its features on the operating system, to a full block, wherein the application is completely blocked from running. The blocking AppHelp message is used only in a situation in which running the application would cause damage to the operating system, such as running a disk utility that was not written to handle the current operating system. Frequently the text of an AppHelp message will direct the user to a Web address where more information and possibly a fix can be found.

The compatibility fix technologies used in Windows XP and Windows Server 2003 are dependent on several database files:

  • MigDB.inf

    This file is used to support the migration from the Windows 95, Windows 98, and Windows Me operating systems. It contains the matching information used to flag applications that are incompatible or require user intervention prior to system upgrade. Problematic applications are listed along with hardware compatibility information in the upgrade report generated by Setup. This file was first included as part of Windows 2000 Setup and has now been updated to run as part of the Windows XP and Windows Server 2003 Setup programs.

  • NTCompat.inf

    This database contains the same type of information as MigDB.inf but is used to support upgrades from the Windows NT 4.0 and Windows 2000 operating systems. This file is also included in the Windows XP and Windows Server 2003 Setup programs.

  • SysMain.sdb

    This file contains both matching information and compatibility fixes. SysMain.sdb contains the information used to provide compatibility fixes for applications that require some help to run correctly on Windows XP and Windows Server 2003. It's in the %windir%\AppPatch folder.

  • AppHelp.sdb

    This database stores only the Help messages that prompt users for patches, provide them with a URL from which to download third-party patches, or tell them where to find further information. This file is also found in the %windir%\AppPatch directory.

These database files form the core functionality of the compatibility technologies in Windows XP and Windows Server 2003. The operating system itself contains no code to verify the compatibility of any software but rather depends on a short system check routine to tell the operating system to refer to the database files for compatibility information. This approach has the effect of giving a high level of support for applications while minimizing the performance impact on the operating system itself.

Once you have identified and tested fixes for your target applications, you can use Compatibility Administrator to create a custom fix database. Figure 18-1 shows what Compatibility Administrator looks like. You can create a custom fix database that contains applications supported by compatibility layers , as well as applications supported by specific compatibility fixes.

Figure 18-1. Use Compatibility Administrator to build custom fix databases for applications that don't work properly in Windows XP and Windows Server 2003.

graphics/f18xo01.jpg

To add compatibility fixes to a custom fix database, you click Create New, Application Fix on the Database menu. The program asks you for the name and filename of the program you're fixing. It prompts you for a compatibility mode as well as individual compatibility fixes that you want to apply to the application. Last it asks you for a list of files that identify the application on target computers. Choose files associated with your application that are installed in the same location. For example, choose a .hlp file that resides in the same directory as the .exe file. Try to uniquely identify your application without choosing an unnecessarily high number of matching files.

The application compatibility technology in Windows XP and Windows Server 2003 provides a way to distinguish files with the same or similar names . The operating system does this through the use of file matching information. If you were creating a compatibility fix for a Setup.exe but did not want this compatibility fix used every time you ran a file named Setup.exe, you would specify a group of other files belonging to the application. By gathering data about the specific properties of these files, the operating system can uniquely identify the application requiring the compatibility fix wherever it exists on the computer.


   
Top


Introducing Microsoft Windows Server 2003
Introducing Microsoft Windows Server(TM) 2003
ISBN: 0735615705
EAN: 2147483647
Year: 2005
Pages: 153

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