To resolve application compatibility issues under VISTA/WIN7/WIN8 by modifying the manifest file

Source: Internet
Author: User

Under Vista/win7/win8, there is a System Compatibility Assistant feature thatAfter the installation is complete or the uninstallation is complete, the Application Compatibility Assistant may pop up with hints that the program may not be installed correctly and is annoying. As shown in the following:


In fact, our program compatibility is not a problem, it is only in the program does not specify the application-compatible operating system, which causes these problems.

VS2008 and VS2010 can generate a. manifest file associated with the EXE application, and Microsoft has added a new <compatibility> field to the file. This field is used to specify which operating systems your application can be compatible with, which in turn resolves program compatibility issues.

The. menifest file is an XML file that is generated with the project compilation, which provides the operating system with a description of the application part of the information, each EXE program or DLL must have a manifest, for the application, Can be a. Manifest file in the same directory as the EXE file, or it can be embedded as a resource inside the EXE file (by modifying the project configuration Manifest tool->input output->embed manifest- >yes), if the application does not have a. manifest file, you will be prompted to lose MSVCR90D.dll and cannot run.

The following is a manifest file with the <compatibility> field added, which adds support for compatibility with the VISTA/WIN7/WIN8 system:

[HTML]View Plaincopy
  1. <? XML  version="1.0" encoding="UTF-8" standalone="yes"?>
  2. < Assembly xmlns="urn:schemas-microsoft-com:asm.v1" Manifestversion="1.0">
  3. < compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  4. < Application >     
  5. <!--The ID below indicates application support for Windows Vista --     
  6. < Supportedos Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
  7. <!--The ID below indicates application support for Windows 7 --     
  8. < Supportedos Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
  9. <!--The ID below indicates application support for Windows 8 --     
  10. < Supportedos Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
  11. </ Application >     
  12. </ compatibility >     
  13. </ Assembly >    


If your project generates a. manifest file, which is not inline mode, modify the file directly and recompile. If your project is set up to embed the. manifest file inside the application, you need to first modify it to non-inline mode, compile, build the. manifest file, modify the file, and then change the project properties to inline mode. The modified. manifest file is also added to the project via the additional manifest files option and recompiled. (as if you were writing a. manifest file, file name: exe name. exe.manifest, then set the manifest to inline mode and add the manifest file directly to the project to compile)

This article was previously referenced by: http://blog.csdn.net/rainkop/article/details/8065297 (title: The Application Compatibility Assistant pops up by modifying the program to resolve Win7), The original text mentions the solution to the compatibility of Win7, so also want to use the same processing, but the ID of the WIN8 system is how much?

Search the Internet for a long time did not find, and then hold the idea of trying to use the Win7 ID number (35138b9a-5d96-4fbd-8e2d-a2440225f93a), searched for an official Microsoft document found, the document is a detailed description of compatibility , and then found the ID of the WIN8 system to solve the compatibility problem on WIN8. The name of the document is the Windows 8 and Windows Server 2012 Compatibility Guide, and the topic is a developer's Guide for Windows compatibility, reliability, and performance. document Download Link: http://download.csdn.net/detail/chenlycly/8821847

PS: If you want to reprint please indicate the source, thank you!

To resolve application compatibility issues under VISTA/WIN7/WIN8 by modifying the manifest file

Related Article

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.