C++卸载程序在windows下的兼容性报错问题

在windows下发现,如果你的程序中含有setup、install或者uninstall等单词。当前这个程序退出以后,系统会弹窗其实兼容性问题,说这个程序是否正确安装。解决方法如下:

1、分离manifest文件。

2、重新构建工程。此时在exe输出目录下会生成manifest文件。

3、编辑manifest文件。在

加入根节点assembly下加入以下信息:

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">  

          <application>

 <!-- Windows 10 -->

              <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>

 <!-- Windows 8 -->

              <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>

              <!--The ID below indicates application support for Windows Vista -->  

              <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>  

              <!--The ID below indicates application support for Windows 7 -->  

              <supportedOS Id="{3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值