Using the Windows 2000 Application Compatibility Tool

Microsoft® Windows 2000 Knowledge Center

The Windows 2000 Application Compatibility Tool

If you have arrived here through a search engine, click here!

 Troubleshooting your Windows 2000 Software Compatibility Problems

When you upgrade to Windows 2000, your hardware’s compatibility with the Windows 2000 operating system isn’t your only concern. You also need to thoroughly test the software that you intend to install. Many companies dedicate one or more of their most experienced people to work with software in a test lab to resolve incompatibility problems, but never assume that this has occurred. Just because the software launches properly, doesn’t necessarily mean that everything is operating correctly. Instead, take each feature of each application through its paces yourself. This is where the Application Compatibility Tool comes in handy!

It’s inevitable, the one problem you can’t avoid in Windows 2000 is that some software applications have features that just won’t work when the software runs. As an example, some specialized vertical accounting software packages designed around specific hardware just won’t work. Moreover, some software packages require direct hardware access that Windows 2000 will not permit. You will find that even some of Microsoft’s applications experience this problem, and typically it’s because of the stricter registry permission levels. Some software that will run on Windows NT 4.0 might not be able to access the Windows 2000 registry when the application makes a call to a specific feature.

The Microsoft Office 97 spell checker is an excellent example of this, as it doesn’t work on a Windows 2000 desktop because it can’t access the necessary registry subkey.

In this case, use regedt32.exe to go to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Proofing Tools\Spelling

and edit Users permissions to permit Set Value and Create subkeys.

You may also want to review the Word for Windows NT Registry Settings in the Microsoft Knowledge Base for more information on this topic.

Resolving Incompatibility Problems
If you’re having problems with some of your applications not operating correctly or not at all, under Windows 2000, in most cases this can be easily resolved. Obviously though (or maybe not so obvious), if the problem involves a program that is simply too old to be run in Windows 2000, or requires an underlying environment not supported in any manner by Windows 2000, even this tool can’t help you. In any event, the solution involves having the errant software believe that it is running on the platform and in the environment it needs and not on a new and different operating system.

The Windows 2000 Application Compatibility Tool (apcompat.exe) is designed to help you create this ideal environment. Microsoft designed apcompat.exe to convince software programs that do their own platform compliance checking that they are really running on an earlier, or supported, operating system. Fortunately this neat tool works more often than it fails. We tested this tool with an accounting software package that had been designed and updated to run on Windows NT 4.0 with a minimum of Service Pack 3 installed, and optimally with Service Pack 4. We to install this package on a Windows 2000 workstation and get it running, and it quickly let us know that the operating system didn’t qualify. We loaded up the Application Compatibility Tool and in less than a half-hour we were up and running.

Installing and Using The Application Compatibility Tool (Apcompat.exe)

To install the Application Compatibility Tool, do the following:

  1. Insert your Windows 2000 CD-ROM disk into your CD-ROM drive.
  2. Navigate to the \support\tools folder.
  3. Now double-click the support.cab file object to open it, and then drag apcompat.exe onto the desktop.
  4. Next, d (You can also complete Win2K’s tools installation procedure, but the first method is quicker.) Drag w2rksupp.chm, which is the Help file for all the tools in the \support\tools folder, onto the desktop. You’ll need this file when you click Help in the apcompat.exe dialog box.

Using the Application Compatibility Tool
The Application Compatibility Tool has both a Graphical User Interface (GUI) as well as a Command-Line Interface.

To use the GUI version: (See below for the command-line version)

  1. Double-click on apcompat.exe to open the dialog display box.

    Note: While you may be already aware of the fact that the software package you want to test will not function, it must be installed in order to test it.

  2. Now enter the path to the program you want to test for compatibility, or click Browse to find the executable file. Click OK. Don’t specify any of the Application Compatibility settings just yet, leave them at Windows 2000 and then click OK. If the program runs and all the features work, then you don’t need to go any further or use apcompat.exe.
  3. If the program you’re testing doesn’t work, enter its path again in the Application Compatibility dialog box.
  4. Now select the appropriate options to resolve the problem. The application’s error message may help you determine which options to try first. As an example, one of the more common error messages will be that the program requires an earlier version of Windows to run. This occurs because programmers hard code queries for the current operating system version into their executable file when a designing a software package for a particular operating system and version. Another of the common error messages is that there isn’t enough disk space available to run the program, even though you may know there are gigabytes of free space. Unfortunately this may be due to the fact that Windows 2000 simply doesn’t support the data type that the application uses to read available free disk space. The Application Compatibility Tool does not help with the following issues:
    • Programs that are written for Microsoft Windows 98, Microsoft Windows 95, or Microsoft Windows 3.x that attempt to access hardware directly.
    • Windows 95-based or Windows 98-based programs that use virtual device drivers (VXDs) to run under Windows 2000.
  5. You can learn more about these issues by following this link to the Microsoft Knowledge Base and review Article Q251062.

Solving OS-version incompatibilities

Use the Operating System selections to resolve an applications query for an operating system. When you first use the tool to see if an application will run, leave it at the default of Windows 2000. If that fails, which typically occurs during the installation process, but can also occur when you launch the executable file if the program already exists on a computer you have just upgraded to Windows 2000 from an earlier operating system such as Windows 98 or Windows NT 4.0.

The hard-coded query for an operating system version doesn’t mean that the application won’t install or run on Windows 2000, but rather may mean that the application isn’t able to accept the response it receives from Windows 2000. The solution then is to have the application believe that it’s running on an operating system other than Windows 2000. All you need to do is just select the operating system on which the application ran previously by checking the appropriate box and then click OK. When the program checks the operating system version, Windows 2000 will respond to the query as though it were the earlier operating system. In order to achieve this, Windows 2000 creates registry entries that incompatible program is looking for when it checks the registry during launch.

Solving Memory Management Problems

You can even use the compatibility tool to Solve memory management issues. During the development of Windows 2000, Microsoft made a number of changes in how Windows 2000 manages memory by comparison with earlier versions of Windows. If your application ran fine on an earlier Windows version, but now your incurring errors when you run it in Windows 2000, try disabling the heap manager to free the memory that the program reserves. All you need to do is open the compatibility tool, enter the path to the program, and select the Disable Heap Manager on Windows 2000 check box.

The Windows 2000 heap manager allocates memory to the subsystem APIs, executive components, and device drivers, as well as automatically expanding and decreasing amounts of memory for all programs as needed. When you disable the heap manager, you avoid memory conflicts with the affected program. Doing this though may cause you to lose some of the power and efficiency that Microsoft has built into Windows 2000, as it hampers part of the improved memory management.

When programs use the heap manager, the Windows 2000 runs internal validation checks that will do one of two things, it will either keep the process running smoothly or it will produce error notifications. If a program doesn’t use calls to the heap manager, you won’t have a problem. If calls are made to memory functions, that will cause conflicts with the heap manager.

Change the Handling of Temp Paths

Some programs limit the number of characters that they use to store the path and name of the temp folder, and the number of characters that identifies the Windows 2000 Temp folder may exceed that limit, such as the \documents and settings\usernamelocal settings\temp, for example. You can sometimes resolve this by using the compatibility tools change temp path feature. Do this by selecting the Use pre-Windows 2000 Temp path check box from the Application Compatibility window’s dialog box to specify a temp folder that is different from the default Windows 2000 Temp folder and one that has a shorter path, such as C:\temp. Now the application will use the new temp folder, which apcompat.exe creates if it doesn’t already exist.

Correct Disk Space Detection for 2-GB+ Drives

Some application may use a data type that Windows 2000 doesn’t support in order to query and read the amount of free disk space available on your computer. Although data types vary by programming language, the process for detecting available disk space is the same. Applications send a query and use a particular data type for storing the response. If this is happening to you, you can adjust the disk-space detection in the compatibility tool to resolve the issue. Some data types in Visual Basic (VB) and C can include Real, Float, Integer or Double Integer. Microsoft’s SQL Server-based applications, for example, use specific data types, such as Tiny and Integer.

If your application uses an incompatible data type, the application may receive a response that says 1.4GB of free space exists but misinterpret or report an incorrect value. When the Windows 20000 data type doesn’t match the data type that the application supports, the application might incorrectly determine that there is insufficient disk space to install, run, or perform a specific operation. Prior to Windows 2000 (and Windows 98) support for extremely large drives was virtually on-existent. You can select the Correct disk space detection for 2-GB+ drives check box in the Application Compatibility dialog box to resolve this problem.

Making Your Changes Permanent

Okay, you’ve sorted out your application, but now what? With the compatibility tool, you can make everything you’ve done permanent. All you need to do is select the Make the above check box settings permanent check box in the Application Compatibility dialog box. This will cause the tool to write the settings to the registry so that they’re available whenever you run the application. The downside is that if none of the solutions work, you’ll need to update the application to a Windows 2000 compatible version.

Using the Application Compatibility Tools Command-Line Version

Although there are no functional differences between the GUI version and the Command-Line version, the latter is a bit faster to use for some. Actually, it is provided for those gurus that are accustomed to doing things in Windows NT from a command line. If you’re getting error messages that provide you with some clues as to why an application doesn’t want run in Windows 2000, using Application Compatibility Tools command-line version to resolve the compatibility problem may actual be a bit less cumbersome.

To use the command-line version, open a command prompt and enter

apcompat [-v ] [-x ] [-d] [-t] [-g] [-k]

The parameters

-v version name specifies the name of the OS you want to return to the program. You enter the following numbers to indicate version name: 1 returns NT 4.0 with SP3, 2 returns NT 4.0 with SP4, 3 returns NT 4.0 with SP5, 4 returns Windows 98, and 5 returns Win95.

Example Syntax: to specify NT 4.0 with SP3 apcompat -v 1

-x  program path specifies the path and name of the executable file for the program you want to test

Example Syntax: to specify NT 4.0 SP3, c:\yourapplication.exe apcompat -v 1 -x c:\yourapplication.exe

-d  disables the heap manager

Example Syntax: to specify NT 4.0 SP3, c:\yourapplication.exe and disable the heap manager apcompat -v 1 -x c:\yourapplication.exe -d

-t  assigns a pre-Windows 2000 Temp folder (e.g. C:\temp) as the program’s temporary folder.

Example Syntax: to specify NT 4.0 SP3, c:\yourapplication.exe, disable the heap manager and assign your c:\temp as the default. apcompat -v 1 -x c:\yourapplication.exe -d -t c:\temp

-g  corrects disk space detection

Example Syntax: to specify NT 4.0 SP3, c:\yourapplication.exe, disable the heap manager, assign c:\temp as the default and correct disk space detection. apcompat -v 1 -x c:\yourapplication.exe -d -t c:\temp -g

-k  finalizes and saves your settings

Example Syntax: to specify NT 4.0 SP3, c:\yourapplication.exe, disable the heap manager, assign c:\temp as the default, corrects disk space detection and save your final settings. apcompat -v 1 -x c:\yourapplication.exe -d -t c:\temp -g -k

Note: If you run the tool several times in order to sort out the problem, changing parameters as necessary, you do not need to attach the -k switch each time to save the settings. This can be done when you have the application running.

As an example, let’s say you launch your program and receive the error message This program requires Windows NT. Just enter the command:

apcompat -v 1 -x c:\yourapplication.exe

If the application runs without error, just re-enter the command and add the -k switch to write the settings to the registry to make them permanent. Now you should be able to run the software normally.

Suggested Testing Techniques
Regardless of whether you use the Application Compatibility Tools GUI or Command-Line interface, it provides a rather simple method by which to correct most issues involving legacy applications. As noted earlier, there are some situation that just cannot be resolved, such as those where an application requires direct hardware access that bypasses Windows 2000 control. These procedures are relatively easy if you only have one machine to be concerned with, but if you are a network manager that is anticipating a medium or large roll-out of Windows 2000, take the time necessary to test all of your in-house proprietary and legacy applications. As you run your compatibility testing, you may find these guidelines helpful:

  1. If you are anticipating a medium to large roll-out, create two types of machines for test-beds, one machine with a clean Windows 2000 installation and another upgraded from the most used operating system in your environment.
  2. Begin the process by testing your high priority software first, such as your company’s accounting program. If you run a help-desk environment, setup and run the software on both test beds to learn what works and what doesn’t.
  3. If your environment consists of Windows NT and Windows 9x, then create your test bed machines accordingly. If you need three, then setup three. The time spent now will be saved many times over later.
  4. Test server-based software on servers that you upgraded from Windows NT as well as on servers with new Windows 2000 installations. Use your workstation test-beds to insure connectivity to the servers you are testing.
  5. Make sure that you test all database based applications for multiple simultaneous access, including access from mixed-client platforms.
  6. Run your testing to include printing from mixed-client platforms.
  7. Most importantly, if you have mission critical software applications that are older, highly customized, or were developed in-house, design your tests to be as thorough as possible, including full simulations if possible.

Although the possible testing criteria may seems endless, the time spent now in resolving issues will save you endless hours later trying to sort all of this out on a critical network. Use the Application Compatibility Tool as one of your priority tools in your first line of defense during a Windows 2000 deployment.

Notice: Windows® 95, Windows® 98, Windows® NT, Windows® 2000 and
Microsoft® Office are registered trademarks or trademarks of the Microsoft Corporation.

About Dewwa Socc

Sahifa Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.