有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java您在RegistrySpec中放了什么。用于Izpack安装以设置发布服务器字段的xml

我正在使用Izpack 5为Java应用程序构建安装程序。我已经安装好了。使用注册表侦听器和其他DLL正确配置xml,以便在安装应用程序时,它会列在“Windows控制面板/程序和功能”下

但是,PublisherSize字段未填写

我知道我需要创建一个RegistrySpec。xml文件,并在安装中引用它。xml,但我应该在其中放什么呢

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


共 (1) 个答案

  1. # 1 楼答案

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

    <?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>
    

    然后可以对“大小”字段执行相同的操作