程序兼容性助手认为我的应用程序是一个安装程序 [英] Program Compatibility Assistant thinks my app is an installer

查看:158
本文介绍了程序兼容性助手认为我的应用程序是一个安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了在Win 7 RTM x64的一个.NET C#WinForms应用程序,它让我们说,我已经叫DataInstaller。

I have created a .NET C# WinForms application on Win 7 RTM x64, which let's say I have called DataInstaller.

当我运行这个程序的调试程序(只是用目前没有任何功能的空形式)之外,它工作正常,直到我关闭窗体。然后我得到的程序兼容性助手一条消息称:

When I run this program outside of the debugger (just an empty form with no functionality at the moment), it works fine until I close the form. I then get a message from the Program Compatibility Assistant that says:

此程序可能没有正确安装

This program might not have installed correctly

然后我得到使用推荐的设置,或者说,预期的安装没有工作,重新安装选项。

I then get the option to reinstall using recommended settings or to say that the install did work as expected.

如果我命名的应用程序DataThingy这不是一个问题,我想这是关系到调用程序*安装获得了UAC盾牌图标的方式。

If I name the app 'DataThingy' this isn't an issue, I guess this is related to the way that programs called *Setup gain a UAC shield icon.

我认为会有一些简单的,我可以把应用程序清单,以prevent呢?

I assume that there will be something simple that I can put in the application manifest to prevent this?

我不知道,如果这发生在Vista上,因为我没有获得当前。

I'm not sure if this occurs on Vista as I don't have access currently.

更改名称不是一个选项,关闭UAC是不是一种选择,所以请不要认为这个!

Changing the name is not an option and turning off UAC is not an option so please don't suggest this!

编辑:

OMG。

看来,如果任一下列条件都为真,UAC坚持其桨:

It seems that if any of the following are true, UAC sticks its oar in:

埃克名称包含单词安装程序

Exe name contains the word Installer

的AssemblyInfo.cs

AssemblyInfo.cs

AssemblyTitle contains the word 'Installer'
    e.g. [assembly: AssemblyTitle("DataInstaller")]
AssemblyProduct contains the word 'Installer'
    e.g. [assembly: AssemblyProduct("Data Installation Utility")]

安装程序,也可以设置。

'Installer' can also be 'Setup'.

据难以相信,它确实。显然,旧VB6的程序员之一得到了在微软搬迁到UAC队结束了。

It beggars belief, it really does. Obviously one of the old VB6 programmers got relocated into the UAC team over at Redmond.

我还需要一个解决办法,我不ppared接受我的申请不可能被一个名为安装程序,因为它不触及注册表或把任何文件在Program Files文件夹$ P $

I still need a workaround, I'm not prepared to accept that my application can't possibly be an called an installer because it doesn't touch the registry or put any files in the Program Files folder.

我认为UAC将会使计算机进入总锁定,如果我试图执行我的应用程序中调用IAmAVirus.exe。 (其实,我不敢尝试,因为我不完全相信,我只是不懂事)

I assume that UAC would put the machine into total lockdown if I tried to execute my application called IAmAVirus.exe. (Actually, I daren't try it because I'm not entirely convinced that I'm just being silly)

推荐答案

将此到您的清单。

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

  <application>

    <!--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="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>

  </application>

</compatibility>

这篇关于程序兼容性助手认为我的应用程序是一个安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆