如何做具有Vista/UAC意识的自解压安装程序 [英] How to do Vista/UAC aware self-extract installer

查看:142
本文介绍了如何做具有Vista/UAC意识的自解压安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用WinZip自解压存档(SFX)分发软件.
我知道 this 该.但是这些似乎不适用于SFX场景.

I distribute my software with a WinZip self-extract archive (SFX).
I am aware of this and that. But those doesn't seem to work for SFX scenarios.

在安装时,SFX解压缩并启动一个包含的程序(由我编写),该程序将进行安装.这包括在Windows控制面板下为程序列表创建注册表项.此外,该程序具有清单. 因此,它应该是可识别Vista的". SFX可执行文件还包括一个清单.

While installing, the SFX unpacks and starts a contained program (written by me), that does the installation. This includes the creation of a registry entry for the programs list under the windows control panel. Further, the program has a manifest. So it should be "Vista-aware". The SFX-executable also includes a manifest.

问题是程序兼容性助手(PCA)抛出其消息 还是"This program might not have installed correctly". 所以我的客户告诉我,我是一个糟糕的程序员...

The problem is that the Program Compatibility Assistant (PCA) throws its message "This program might not have installed correctly" anyway. So my customers tell me i'm a bad programmer...

我在Google上搜索了很多,并阅读了很多有关PCA的信息,包括许多Microsoft网站.
那些告诉我去做:

I googled a lot, and read a lot about the PCA, including many Microsoft sites.
Those tell me to do:

  1. 嵌入清单
  2. 在Windows控制面板下为程序列表创建注册表项

我的清单如下:

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <applicationRequestMinimum>
        <defaultAssemblyRequest permissionSetReference="Custom" />
        <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
      </applicationRequestMinimum>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</asmv1:assembly>

那我哪里出错了?
PCA还有其他事情要做吗?
SFX可执行文件是否还必须包含其他内容?

So where did i go wrong?
Are there any further things to do for the PCA?
Do the SFX executable have to include some other things?

推荐答案

版本字段.我相信这是给我们的卸载程序的,但它也可能适用于您的情况.

We fixed a similar issue in NSIS by setting a version field in the PE header to 6.0. I believe that was for our uninstaller but it might apply to your scenario as well.

这篇关于如何做具有Vista/UAC意识的自解压安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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