4

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?
pnuts
  • 58,317
  • 11
  • 87
  • 139
igor.sol
  • 627
  • 7
  • 18

2 Answers2

3

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
  • 18,808
  • 8
  • 56
  • 85
  • @JohnB - according to http://technet.microsoft.com/en-us/library/cc748935(WS.10).aspx, "open Group Policy Management Console by running gpmc.msc, and then edit an appropriate GPO. Expand Computer Configuration, expand Administrative Templates, expand System, expand Troubleshooting and Diagnostics, and then click Application Compatibility Diagnostics. View the Group Policy settings that are available. If you want more information about a setting, double-click the setting and then click the Explain tab." I hope that is self-explanatory because I've never done it myself. – Kate Gregory Feb 23 '11 at 18:07
  • can it be done with Local Group Policy *(LGP)* instead? Group Policy Management Console is more for Active Directory I think. – JohnB Feb 24 '11 at 00:17
2

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
  • 3,730
  • 3
  • 37
  • 61