The automatic configuration program runs in compatible mode in Windows 7.

Source: Internet
Author: User
Tags old windows account security

Compatibility mode of Windows programs

1. What is the compatibility mode? Why use compatibility mode?

Generally, applications are optimized for a specific operating system or operating system version. When a user tries to run an older application on a new version of Microsoft Windows operating system, it may cause program compatibility problems, because this program was not originally specially written for this newer operating system.

For example, applications running in earlier versions of Windows may not run properly on Windows XP Professional. This is partly because:

?

When Windows reports a new, higher OS version, the application cannot run. Generally, as long as the user removes this obstacle, the application can run well on a new version of Windows.

?

The application calls the Win32 API function of an earlier version, and returns an unexpected value on a computer with a large amount of resources (such as available disk space.

?

Applications require Windows Data in older formats.

?

The application requires that user information (such as personal and temporary folders) be located at a specific location or in a specific format.

These problems may cause the program to fail to be executed, or the normal results may fail. In order to run some early programs correctly on XP, 2003, and Vista, we need to set its compatibility mode-a special running environment in which, the operating system simulates some of the early environment required to run the program correctly.

Compatibility mode

The compatibility mode is also called a "layer". Essentially, it is a set of compatibility patches, simulating a specific operating system environment for running programs. For example, Windows 95 compatibility mode contains about 50 of the most common compatibility patches. With these patches, Old windows 95 programs can run normally on Windows XP. Some of the repairs include: returning the Windows 95 credential; accurately simulating the Windows 95/Windows 98/Windows ME heap manager; redirect the desktop and Start Menu of Windows 95/Windows 98/Windows ME to the file path repair in the corresponding folder under Windows XP "Documents and Settings", and virtualize the registry, to simulate the registry data of Windows 95/Windows 98/Windows ME.

There are three different compatibility modes:

  • In end user mode, this mode is displayed through various shell features in Windows XP/2003/Vista, such as the compatibility tab or program compatibility wizard. You can access five basic compatibility modes through this interface: Windows 95, Windows 98/Windows ME, Windows NT 4.0, Windows 2000, and Windows XP.
  • System Mode. In addition to all the end user modes listed above, this mode also provides several other options, independent software developer (isV) system administrators and other IT personnel can use these options to control application behavior. These options include Restricted User Account Security Mode and configuration file mode. When a program must run as a special user in a restricted security context, it needs to use the Restricted User Account Security mode. The configuration file mode is used when you decide how an application should interact with the Windows user configuration file. Both modes can be accessed and set using the qfixapp or compatadmin tool. We will introduce these two tools in detail later in this article.
  • Custom mode. system administrators or other IT professionals can use the compatadmin tool (for more information about this tool, see the following section) to create this mode for a special program or assembly. After the creation is complete, the custom mode can only be applied to the specific application that the user is installing, and any required patches in the repair package can be used.

2. How to enable compatibility mode

The most common method is to open the file attributes and select the "run this program in compatible mode" check box on the "compatibility" dialog box, select the version of the earlier operating system to be compatible from the drop-down list below. This actually corresponds to adding a key value under the Registry hkcu/software/Microsoft/Windows NT/CurrentVersion/appcompatflags/layers. The key value name is the full path of the executable program file, the data type is REG_SZ, and the data value is compatible with the operating system code.

Example: assume that the program starcraft.exe under D:/GAME/Star Game 1.12”cannot be run under XP, but can be executed under Windows 2000, we need to set the compatibility mode to Windows 2000, there are two methods to achieve this. Method 1: on the "compatibility" tab of the file Properties dialog box, select the "run this program in compatible mode" check box, and then select "Windows 2000" from the drop-down list below. Method 2: enter the following command in the command line to get the same effect

Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows NT/CurrentVersion/appcompatflags/layers"/V "D: /GAME/Starcraft 1.12/starcraft.exe "/T REG_SZ/D" Win2000 "/F

In fact, method 1 is mainly used for user operations, while method 2 is mostly used for programming.

3. In-depth

3.1 How does the operating system use the compatibility technology?

The normal operation of compatibility technology depends on the database files used by the operating system to interact with the operating system during program installation and operation. In addition to a fast program check routine in a program loader, the application compatibility architecture is always outside the core operating system components (such as kernel components. Only when the initialization database query of the loaded program indicates that the program requires compatibility technologies, these technologies will be called. This eliminates the need to use special Compatibility code for a program to run in the API. The support for compatibility patching does not intuitively affect the execution performance of the operating system or program.

The database files used by the operating system are as follows:

  • Migdb. inf, which is used to support Windows 95, Windows 98, and Windows ME system upgrades. This file contains a wealth of matching information and flag applications, which indicate which programs have incompatibility issues before the system upgrade, or which programs require user intervention.
  • Ntcompat. inf, the database contains the same information as migdb, but it is used to provide support for Windows NT 4.0 and Windows 2000 system upgrades.
  • Sysmain. SDB. The database includes both matching information and compatibility patching. You can find the file in the % WINDIR %/apppatch directory.
  • Apphelp. SDB, the database file only stores some help information about prompting users to install the patch, and provides them with URL addresses to facilitate their download of non-Microsoft patches, and tell them where they can find more details. This file can also be found in the % WINDIR %/apppatch directory.

Therefore, migdb and ntcompat form the migration Compatibility Technology for Windows XP, while sysmain and apphelp form (and effectively include) The compatibility technology required by the program to install the runtime on Windows XP: compatibility patching, compatibility mode, and application help.

 

 

 

 

The compatibility mode is essentially to modify the sysmain. SDB compatibility database under C:/Windows/apppatch. (Unfinished ......)

Note:

1. Functions of the reg add Parameter

The name of the value to be added under/v.

/T regkey Data Type

[REG_SZ | reg_multi_sz | reg_expand_sz |

REG_DWORD | REG_BINARY | reg_none]

If this parameter is ignored, REG_SZ is used.

/D the data to be allocated to the added registry valuename.

/F forcibly overwrite the existing registry key without prompting.

2. Operating System Code

Windows NT 4.0 (Service Pack 5) nt4sp5

Windows 95 Win95

Windows 98 or Windows ME Win98

Windows 2000 win2000

Windows XP WINXP

Windows 2003 win2003

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.