Windows specific properties

August 13, 2025 · View on GitHub

<winConfig>

    <!-- general properties -->
    <icoFile>path/to/icon.ico</icoFile>
    <generateSetup>true|false</generateSetup>
    <generateMsi>true|false</generateMsi>
    <generateMsm>true|false</generateMsm>

    <!-- exe creation properties -->
    <headerType>gui|console</headerType>
    <wrapJar>true|false</wrapJar>
    <companyName>${organizationName}</companyName>
    <fileVersion>1.0.0.0</fileVersion>
    <txtFileVersion>${version}</txtFileVersion>
    <productVersion>1.0.0.0</productVersion>
    <txtProductVersion>${version}</txtProductVersion>
    <fileDescription>${description}</fileDescription>
    <copyright>${organizationName}</copyright>
    <productName>${name}</productName>
    <internalName>${name}</internalName>
    <shortcutName>${name}</shortcutName>
    <originalFilename>${name}.exe</originalFilename>

    <!-- choose EXE creation tool -->
    <exeCreationTool>launch4j|winrun4j|why</exeCreationTool>
    <vmLocation>relative/path/to/jvm.dll</vmLocation>

    <!-- setup generation properties -->
    <setupMode>installForAllUsers|installForCurrentUser|askTheUser</setupMode>
    <setupLanguages>
        <english>compiler:Default.isl</english>
        <german>compiler:Languages\German.isl</german>
        <spanish>compiler:Languages\Spanish.isl,${project.basedir}\languages\Custom_es.isl</english>
        [...]
    </setupLanguages>
    <disableDirPage>true|false</disableDirPage>
    <disableProgramGroupPage>true|false</disableProgramGroupPage>
    <disableFinishedPage>true|false</disableFinishedPage>
    <disableRunAfterInstall>true|false</disableRunAfterInstall>
    <disableWelcomePage>true|false</disableWelcomePage>
    <createDesktopIconTask>true|false</createDesktopIconTask>
    <removeOldLibs>true|false</removeOldLibs>

    <!-- signing properties -->
    <signing>
        <keystore>path/to/keystore</keystore>
        <storepass>password</storepass>
        <alias>cert_alias</alias>            
        [...]
    </signing>

    <!-- windows registry entries added during installation -->
    <registry>
        <entries>
            <entry>
                <key>root:path/to/my/key</key>
                <valueName>name</valueName>
                <valueType>type</valueType>
                <valueData>data</valueData>
            </entry>
            [...]
        </entries>
    </registry>

</winConfig>
PropertyMandatoryDefault valueDescription
icoFile:x:nullIcon file. If null, takes the default one.
generateSetup:x:trueGenerates Setup installer.
generateMsi:x:trueGenerates MSI installer.
generateMsm:x:falseGenerates MSI merge module.

Exe creation properties

PropertyMandatoryDefault valueDescription
headerType:x:"gui"EXE header type: console or gui.
wrapJar:x:trueWrap JAR file in native EXE.
companyName:x:${organizationName}EXE company name.
fileVersion:x:"1.0.0.0"EXE file version.
txtFileVersion:x:${version}EXE txt file version.
productVersion:x:"1.0.0.0"EXE product version.
txtProductVersion:x:${version}EXE txt product version.
fileDescription:x:${description}EXE file description.
copyright:x:${organizationName}EXE copyright.
productName:x:${name}EXE product name.
internalName:x:${name}EXE internal name.
originalFilename:x:${name}.exeEXE original filename.
trademark:x:EXE trademark.
language:x:EXE language.
exeCreationTool:x:launch4jEXE creation tool: launch4j, winrun4j or why.
vmLocation:x:jvm.dll path relative to the bundled JRE. Only for WinRun4J. *1

*1: If a JRE is bundled and vmLocation is not specified, it uses bin\client\jvm.dll or bin\server\jvm.dll as VM location by default.

Setup generation properties

PropertyMandatoryDefault valueDescription
setupMode:x:installForAllUsersSetup installation mode: require administrative privileges or not. *
setupLanguages:x:<english>compiler:Default.isl</english><spanish>compiler:Languages\Spanish.isl</spanish>Map with setup languages.
shortcutName:x:${name}Sets the name of the user optional shortcut created on the desktop
disableDirPage:x:trueIf this is set to true, Setup will not show the Select Destination Location wizard page.
disableProgramGroupPage:x:trueIf this is set to true, Setup will not show the Select Start Menu Folder wizard page.
disableFinishedPage:x:trueIf this is set to true, Setup will not show the Setup Completed wizard page.
disableRunAfterInstall:x:trueIf this is set to true, Setup will not launch the application after install.
disableWelcomePage:x:trueIf this is set to true, Setup will not show Welcome Page.
createDesktopIconTask:x:trueIf this is set to true, Setup will ask for desktop icon creation.
removeOldLibs:x:falseIf there's a previous installation, removes old libs folder before install.

SetupMode

Property winConfig.setupMode can be set with 3 possible values:

  • installForAllUsers (default value): installs the app for the all users in %ProgramFiles% folder (behaviour can be changed when running setup installer from command-line with /currentuser argument).
  • installForCurrentUser: installs the app for the current user in %USERPROFILE%\AppData\Local\Programs folder (behaviour can be changed when running setup installer from command-line with /allusers argument).
  • askTheUser: asks to the final user if the app has to be installed for all users or only for the current user.

Signing properties

MandatoryDefault valueDescription
storetype:x:JKSThe type of the keystore: JKS (Java keystore), PKCS12 (.p12 or .pfx files), PKCS11.
keystore:heavy_check_mark:, unless certfile and keyfile are specified.The keystore file, or the SunPKCS11 configuration file.
certfile:heavy_check_mark:, unless keystore is specified.The file containing the PKCS#7 certificate chain (.p7b or .spc files).
keyfile:heavy_check_mark:, unless keystore is specified.The file containing the private key. PEM and PVK files are supported.
storepass:x:The password to open the keystore.
alias:heavy_check_mark:, if keystore is specified and more than one alias exist.The alias of the certificate used for signing in the keystore. Java code signing certificates can be used for Authenticode signatures.
keypass:x:The password of the private key. When using a keystore, this parameter can be omitted if the keystore shares the same password.
alg:x:SHA-256The digest algorithm (SHA-1, SHA-256, SHA-384 or SHA-512).

Example using a Java KeyStore

<signing>
    <keystore>c:\Users\fvarrui\keystore.jks</keystore>
    <storepass>123456</storepass>
    <alias>fvarrui</alias>
</signing>

Add values to the Windows Registry

This property allows to specify Windows Registry values to be added during installation. These values will be removed during uninstallation.

Structure of an entry:

MandatoryDefault valueDescription
key:heavy_check_mark:Key path, composed by root (HKCU, HKLM, HKU, HKCC, HKCR), ":" and subkey.
valueName:heavy_check_mark:Value name.
valueType:x:REG_SZValue type: REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ, REG_DWORD, REG_QWORD, REG_BINARY.
valueData:x:""Data to be stored.

Example

Next configuration will add a value named greeting in MyApp key, under HKEY_CURRENT_USER (HKCU) root, of type REG_SZ (string), with value hello:

<registry>
    <entries>
        <entry>
            <key>HKCU:MyApp</key>
            <valueName>greeting</valueName>
            <valueType>REG_SZ</valueType>
            <valueData>hello</valueData>
        </entry>
    </entries>
</registry>