Windows 7 Program Compatibility Assistant appeared for my app. Why?

天涯浪子 提交于 2019-12-23 12:38:37

问题


I have created a native application. It works without questions under Win XP and Win Vista. Under Win 7 my application installed fine. I ran it. It worked normally until i selected 'Exit' from menu. On exit "Program Compatibility Assistant" window appeared telling me my application is incompatible with Windows 7 and some compatibility settings was applied.

My questions are:

  1. How can i know what my application did to trigger Program Compatibility Assistant? Is there any list of do's and dont's?
  2. Where can i look for compatibility settings applied to my application?

回答1:


Don't look in your exit code specifically. The PCA runs after your app finishes. One thing that triggers it for me is your app not doing much. For example if you rename some "hello world" app into setup.exe and run it, it will elevate, but then it won't actually change anything on your machine the way a true setup app does. Your registry, program files directory etc are all the same. So the PCA says "hm, maybe there were some access denied or whatever, seems like this didn't work, your settings might not be right." In other words this might be harmless. However I do find it can leave apps demanding to elevate every time when they don't really need to, so it's worth your time investigating a little.

The changes are stored under group policy.




回答2:


My guess is that your app's exit code is not 0 and the value instead suggests win7 to act as it does.



来源:https://stackoverflow.com/questions/3069750/windows-7-program-compatibility-assistant-appeared-for-my-app-why

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!