我的应用程序出现了 Windows 7 程序兼容性助手。为什么?
我创建了一个本机应用程序。它可以在 Win XP 和 Win Vista 下毫无问题地运行。在 Win 7 下我的应用程序安装得很好。我运行了它。它正常工作,直到我从菜单中选择“退出”。退出时出现“程序兼容性助手”窗口,告诉我我的应用程序与 Windows 7 不兼容,并且应用了一些兼容性设置。
我的问题是:
- 我如何知道我的应用程序做了什么来触发程序兼容性助手?有什么该做和不该做的清单吗?
- 在哪里可以查找应用于我的应用程序的兼容性设置?
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:
- How can i know what my application did to trigger Program Compatibility Assistant? Is there any list of do's and dont's?
- Where can i look for compatibility settings applied to my application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不要专门查看您的退出代码。 PCA 在您的应用程序完成后运行。对我来说触发它的一件事是你的应用程序没有做太多事情。例如,如果您将某些“hello world”应用程序重命名为 setup.exe 并运行它,它会提升,但实际上它不会像真正的安装应用程序那样改变您计算机上的任何内容。你的注册表、程序文件目录等都是一样的。所以 PCA 会说“嗯,也许有一些访问被拒绝或者其他什么,看起来这不起作用,你的设置可能不正确。”换句话说,这可能是无害的。然而,我确实发现它可能会让应用程序在每次不需要时都要求提升,因此值得您花时间进行一些调查。
更改存储在组策略下。
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.
我的猜测是您的应用程序的退出代码不是 0,并且该值建议 win7 执行它的操作。
My guess is that your app's exit code is not 0 and the value instead suggests win7 to act as it does.