在Win7/Vista下,如何以兼容模式运行exe?
https://msdn.microsoft.com/en-us/library/dd371711(VS.85).aspx
问题描述:在Vista以上版本运行WTL程序,有时候会提示“这个程序可能安装补正确...”的错误,如下图所示:
解决方法:需要在VS中设置,工程属性->Configuration Properties->Manifest Tool->Input and Output->Addition Manifest Files,设置wtl.exe.manifest文件的路径;如下图所示:
其中,wtl.exe.manifest文件内容如下:
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 </application> 10 </compatibility> 11 </assembly>
时间: 2024-10-14 04:25:01