Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Index

On this page

< Previous article   Next article >


INFO: About Keyman for Windows Setup

About setup.exe

The Keyman installation bootstrapper is a self-extracting executable file that optionally contains a Windows Installer technology MSI file, and keyboard packages.

The bootstrapper uses a number of techniques to streamline installation for end users. A standard download from the keyman.com website will include just the bootstrap installer.

Setup will check for packages to install from:

  1. command line parameters
  2. its own filename pattern
  3. the local directory it is in
  4. An embedded zip file

1. Command Line Parameters

Option Description
-c Continue setup after Windows restarts (this parameter is used internally)
-s Install silently
-o Run offline. For offline setup, all packages specified must be available as a part of the self-extracting archive or in the same folder as the setup executable.
-x <path> Extract files from the self-extracting archive and exit.
-p <package_id>[=bcp47][,...] Download package matching package_id and install associated with BCP 47 language identifier; multiple packages separated by commas.
-t alpha|beta|stable Download and install the corresponding tier of Keyman for Windows from keyman.com. If not specified, the installer will use the tier that it was built with (this can be viewed in the Setup Options dialog).
-d Set the default configuration values for general, startup, OSK, hotkeys and advanced settings. If this switch is not used, settings from the currently installed Keyman will be preserved. If it is a clean install then the defaults will be set.

2. keyman-setup filename patterns

The filename of the executable can be used to determine the packages to download and install from keyman.com. If the filename matches the following pattern, then the package identifiers and tier are extracted from the filename and used in the same way as the -p and -t parameters respectively.

    keyman-setup[-tier][.package.bcp47][...].exe

You can append multiple package and BCP 47 identifiers, as implied by the [...] tag.

Example:

    keyman-setup-alpha.sil_ipa.en-fonipa.khmer_angkor.km.exe

The keyman.com website uses this technique to provide a setup bootstrap that will then know which files to download, without requiring separate versions of each file.

3. Checking for packages in local directory

By default, Setup will not install packages from the same folder as the installer, unless a file setup.inf is present. This is because a typical download scenario for Keyman is to download into a common Downloads folder, which may well contain packages as well. It doesn't make sense to default to installing other files from the Downloads folder unless it is specifically requested.

4. Embedded zip file

If a zip file is appended to the setup executable (e.g. with copy /b setup.exe+file.zip setup-file.exe), then Setup will extract the contents of the zip file to a temporary folder and install the included components. This also requires a setup.inf file.

IMPORTANT: You must use the unsigned setup.exe executable to create a combined installer. The version of setup.exe that is listed on the downloads.keyman.com site is signed, for general use. The unsigned executable is available in the Keyman Developer installation, under %ProgramFiles(x86)%\Keyman\Keyman Developer\Redist\Setup. Once you have combined the executable with the zip file, you can safely sign the resulting file.

The zip file should include:

  1. setup.inf
  2. keymandesktop.msi
  3. any desired package files (e.g. sil_ipa.kmp)

setup.inf format

setup.inf is a Windows INI format file. It can have three sections. All sections are optional.

  • [Setup]: Global setup preferences
  • [Packages]: A list of packages to install
  • [Strings]: A list of user interface strings

[Setup] section

  • MSIFileName: This should be keymandesktop.msi if you are including the Windows Installer file in the install. It must be present in the same location as setup.inf. If you do not include this, then the local .msi file will be ignored, even if it is present.
  • StartWithConfiguration: If set to 1, open Configuration on first run (default 0)
  • StartDisabled: If set to 1, install the packages but don't add language associations (default 0)

[Packages] section

Include the filename of each package, and optionally append an =description to the entry; however, the description is ignored by Setup in version 14.0, as the details are read directly from the package. These files must be in the same location as setup.inf.

[Strings] section

If present, these strings provide a user interface translation. The identifiers for these strings and their default values can be viewed in the .kps file format reference.

Sample setup.inf.file

    [Setup]
    MSIFileName=keymandesktop.msi

    [Packages]
    khmer_angkor.kmp=Khmer Angkor 1.0
    sil_ipa.kmp

Applies to

  • Keyman for Windows 14.0+

History

  • Keyman for Windows 14.0 adds the -p and -t parameters and also parses the installer filename; earlier versions required all content to be included in the self-extracting archive.
  • Keyman for Windows 15.0 adds the -d parameter.