views:

78

answers:

2

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  A: 

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.

Kate Gregory
+2  A: 

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

AOI Karasu