Matthewl 发表于 2015-5-12 13:23:55

Adding a Windows 7 Application Manifest to your application

  
  转自:http://blogs.msdn.com/ukisvdev/archive/2009/09/23/adding-a-windows-7-application-manifest-to-your-application.aspx
  
  One of the most important things you can do to make an application compatible with Windows 7 is to add an application manifest to it. When you do this, you are telling Windows that you have tested your application on Windows 7 and that there is no need for it to run application compatibility ‘features’ such as UAC virtualization and the Program Compatibility Assistant.
  There are a number of ways to add a manifest, you can do it from within Visual Studio 2008 by simply selecting Add -> New Item… to the project, and selecting Application Manifest File, and for earlier versions of Visual Studio you can simply add it as a resource of type RT_MANIFEST, or you can use the mt.exe tool in the Windows SDK to add it to the compiled executable – before you have signed it of course.
  If you are using the mt.exe tool it’s best to extract any existing manifest first, as one may already be included for XP Styles or Side-by-Side COM components.
  You can extract an application manifest from an executable by running the following command: mt -inputresource:myapp.exe;#1 -out:myapp.manifest
  You can then add the Windows 7 manifest shown below back into the executable using the following command:mt -manifest myapp.manifest -outputresource:myapp.exe;#1
  
页: [1]
查看完整版本: Adding a Windows 7 Application Manifest to your application