1

我正在使用 Izpack 5 为 Java 应用程序构建安装程序。我使用注册表侦听器和其他 dll 正确配置了 install.xml,以便在安装应用程序时它会在 Windows Control Panel/Program and Features 中列出。

但是没有填写PublisherSize字段。

我知道我需要创建一个 RegistrySpec.xml 文件并在 install.xml 中引用它,但是我在里面放了什么?

我发现的所有示例都显示了替换卸载包的示例,但这不是我想要做的我对默认卸载程序很满意并且不想破坏该部分,我只想添加发布者和大小字段.

4

1 回答 1

0

您只需在同一键路径中添加具有相应值的新条目,如下所示:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- 
    ATTENTION!!! do not edit with an editor which do not handle UTF-8 in a right manner!!
    Storing with a wrong editor can crash this file!
    Registry definition file for IzPack Installation.
    $Id$
-->

<izpack:registry version="5.0"
                 xmlns:izpack="http://izpack.org/schema/registry"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://izpack.org/schema/registry         http://izpack.org/schema/5.0/izpack-registry-5.0.xsd">

    <pack name="UninstallStuff">
        <!-- Special "pack", if not defined an uninstall key will be generated automatically -->
        <!-- The variable $UNINSTALL_NAME can be only used if CheckedHelloPanel will be used
               because there the variable will be declared. With that variabel it is possible
               to install more as one instances of the product on one machine each with an
               unique uninstall key. -->
...
        <value name="Publisher"
            keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$APP_NAME $APP_VER"
            root="HKLM"
            string="MyCompany Software Inc." />
...
    </pack>
</izpack:registry>

然后您可以对 Size 字段执行相同的操作。

于 2013-11-06T19:32:24.000 回答