Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Bootstrapper » Reference » The installer settings (<name>.msi.json)

The installer settings (<name>.msi.json)

The installer settings describe the Windows Installer package (MSI) that the IT installs once and that places the starter on a computer: the data of the package, whether it installs per computer and/or per user, the dialogs the person installing sees and their texts per language. They lie beside the project file and are read only when the MSI is built; the starter never reads them when it starts, and they never reach the users' PCs through a delivery.

Requires WKL Bootstrapper 2.3.0 or later. /check checks the file, /msi-sources writes the WiX sources from it, and tools/New-StarterMsi.ps1 builds the packages.

Where the file lies

The file is named after the project file, in the same folder:

Project fileInstaller settings
demo.bootstrapper.json (the project file named after demo.exe)demo.msi.json
bootstrapper.jsonbootstrapper.msi.json
checkout.json (named with /RUNCFG)checkout.msi.json

Paths in the file (icon, license, banner, dialog picture, fragments) are relative to the file's folder and may not leave it (..).

What gets built

tools\New-StarterMsi.ps1 -Project <project file> builds one package per scope and language:

SettingsPackages
No <name>.msi.json<product>-<version>.msi: per computer, English, without dialogs - the package of releases before 2.3.0
One scope, one language<product>-<version>.msi
Several scopes or languages<product>-<version>-<scope>-<culture>.msi, for example Demo-1.2.0-user-de-DE.msi

The WiX sources stay in <output folder>\<product>.wix (machine.wxs, user.wxs, ui.wxs, one .wxl per culture), where they can be read or built by hand; -SourcesOnly writes only them. The per-computer package keeps the upgrade code of the packages built before 2.3.0, so a new package replaces an old one; the per-user package has its own code, so the two never replace each other.

What the package does and does not do

The package places the starter, its project file, the INI file of the dialog values and the logo, and creates the shortcuts. Everything per user - copying the application, components, trusted location, start - stays the starter's work on each start (see The installer). Values entered in an own page are written to the INI file beside the starter, where the application reads them; the starter itself does not interpret them.

Example

{
  "format": 1,
  "package": { "name": "Demo", "manufacturer": "Contoso", "license": "installer\\license.rtf", "banner": "installer\\banner.png" },
  "scopes": [ "machine", "user" ],
  "shortcuts": { "startMenu": true, "desktop": true },
  "languages": [ "de-DE", "en-US" ],
  "texts": { "de-DE": { "WelcomeDlgTitle": "Willkommen bei Demo" } },
  "dialogs": { "install": [ "welcome", "license", "folder", "page:server", "verify" ], "exit": { "launch": true } },
  "pages": [
    { "id": "server", "title": { "de-DE": "Datendienst", "en-US": "Data service" }, "description": "URL",
      "controls": [
        { "type": "text", "label": "Where the application finds its data." },
        { "type": "edit", "property": "SERVER", "label": "URL", "default": "https://", "required": true, "maxLength": 200 },
        { "type": "radio", "property": "MODE", "label": "Mode", "default": "live",
          "options": [ { "value": "live", "text": "Live" }, { "value": "test", "text": "Test" } ] }
      ] }
  ],
  // The values go to demo.ini beside demo.exe, section [Settings].
  "ini": { "section": "Settings" },
  "fragments": [ "installer\\extra.wxs" ]
}

Comments (//) and trailing commas are allowed. Unknown keys are refused, so a misspelt key never builds a package that silently lacks a dialog.

How the values reach the application

  • Every value of an own page is written to the INI file beside the starter (demo.ini beside demo.exe, section [Settings]): KEY=value, a check box as 1 or 0. The application reads the file; the starter does not. To tell the application where the file lies, pass its path in the project's start.environment, for example "WKL_SETTINGS": "[StarterDir]\[StarterName].ini" (see The project file); the application reads Environ("WKL_SETTINGS").
  • The IT can set every value without dialogs on the command line, with the property name: msiexec /i Demo-1.2.0-machine-de-DE.msi /qn SERVER=https://data.company.com MODE=test LOGGING=0. 0 clears a check box.
  • The values are remembered (HKEY_LOCAL_MACHINE per computer, HKEY_CURRENT_USER per user, key Software\WKL\Starter\<product>\Settings). A later “Change” from the maintenance dialog or from Apps starts from them and writes the INI file again; a repair keeps them.
  • Order: a value from the command line wins over the remembered one, the remembered one over the default.

Texts in several languages

Every text the person installing reads (title, description, label, hint, text of an option, launchText) is written either as one string, valid for every language, or as an object with one string per culture:

"title": "Server"
"title": { "de-DE": "Datendienst", "en-US": "Data service" }

A culture without its own text takes the string for every language, else stays empty.

Keys

KeyDefaultMeaning
format-Always 1.
package.namedisplay.name of the project fileThe name under Apps and in the dialogs.
package.manufacturerdisplay.publisher of the project fileThe publisher.
package.versionproduct version of the starterTwo or three numbers; Windows Installer compares only the first three.
package.upgradeCodea name GUID of product and scopeThe upgrade code; the default stays the same across builds. Set it only to take over a package built before.
package.iconnoneAn .ico for the entry under Apps.
package.licensenoneAn .rtf file shown by the dialog license.
package.bannerthe WiX banner.bmp or .png, 493 x 58 pixels, at the top of the dialogs.
package.dialogImagethe WiX picture.bmp or .png, 493 x 312 pixels, in the welcome and exit dialogs.
scopes[ "machine" ]machine (per computer, the IT installs with administrator rights) and/or user (per user, without). One package per scope, each with its own upgrade code.
installFolder.machine[ProgramFilesFolder]WKL\<product>The installation folder per computer: [ProgramFilesFolder] or [CommonAppDataFolder], then the path below it. The dialog folder lets the person installing choose another.
installFolder.user[LocalAppDataFolder]Programs\WKL\<product>The installation folder per user: [LocalAppDataFolder] or [AppDataFolder], then the path below it.
shortcuts.startMenutrueA shortcut in the start menu (all users per computer, the user per user).
shortcuts.desktopfalseA shortcut on the desktop.
shortcuts.namepackage.nameThe name of the shortcuts.
languages[ "en-US" ]The cultures the package is built for: en-US, de-DE, sl-SI, hr-HR, it-IT. The first is the default.
textsnoneTexts of the standard dialogs to replace, per culture: the WiX localisation id (for example WelcomeDlgTitle) and the text, written as WiX writes it: [Name] is a property, {\WixUI_Font_Title} a font. Only cultures of languages.
dialogs.install[ "welcome", "verify" ]The dialogs of an installation in order: welcome first, then license, folder and page:<id> in any order, and verify last. Progress and the exit dialog always follow.
dialogs.changeShowsPagestrue“Change” in the maintenance dialog leads through the own pages again, so their values can be changed later.
dialogs.exit.launchfalseA check box in the exit dialog that starts the starter after a new installation.
dialogs.exit.launchText“<name> jetzt starten” in a German package, otherwise “Start <name>”The text of that check box.
pagesnoneThe own pages (see below).
ini.file<starter name>.iniThe file name of the INI file beside the starter (demo.ini beside demo.exe).
ini.sectionSettingsThe section the values are written to.
fragmentsnoneWiX source files (.wxs) of the publisher included in the build. Every component, component group, property, UI and custom action a fragment defines directly in a <Fragment> is referenced, so naming the file is enough.

Own pages

An own page appears in the frame of the standard dialogs (banner with title and description, Back/Next/Cancel) and holds controls from top to bottom.

Key of a pageMeaning
idLetters and digits, starting with a letter, unique; shown with page:<id> in dialogs.install.
titleThe title in the banner (required).
descriptionThe line below the title.
controlsThe controls (at least one).
Key of a controlMeaning
typetext (a paragraph), edit, checkbox, radio, combo or folder (a path typed into an edit field; the browse dialog of Windows Installer serves only the installation folder).
propertyThe public property holding the value: upper-case letters, digits and _, starting with a letter. The IT can set it on the command line (msiexec /i demo.msi SERVER=https://...). Not for text.
labelThe label above the control; for text the paragraph itself; for checkbox the text beside the box. Brackets are shown as written.
hintA hint below the control in a smaller font.
defaultThe value before the person installing changes it; for checkbox 1 or empty, for radio and combo one of the options.
requiredtrue keeps Next disabled while the value is empty.
maxLengthThe longest value of an edit; 0 for no limit.
optionsThe choices of radio and combo: value (stored) and text (shown).
iniKeyThe key in the INI file; empty for the property name.

Rules

The starter checks these rules with /check <name>.msi.json (exit code 0 valid, 11 problems; /json lists every problem for Bootstrapper Manager). The first broken rule is named with what breaks it:

  • scopes names machine and/or user, each once.
  • dialogs.install begins with welcome and ends with verify, each once, and shows no standard dialog twice: the person installing confirms before anything changes.
  • installFolder begins with a standard folder of its scope (see the keys) and has a path below it.
  • Every page of pages is shown in dialogs.install, and every page:<id> names a page.
  • license in dialogs.install needs package.license.
  • Properties are upper-case and used once.
  • A property or INI key that looks like a password (pass, pwd, secret, token, kennwort) is refused: the INI file beside the starter is readable by every user of the computer. Secrets belong in the application's own sign-in.
  • The default of radio and combo is one of the options; the default of checkbox is 1 or empty.
  • maxLength applies to edit only.
  • languages names only cultures of the list; texts only cultures of languages.
  • package.version is two or three numbers, package.upgradeCode a GUID.
  • Files have the right ending (.ico, .rtf, .bmp/.png, .wxs), are relative and without ..; when the file is valid, /check also names every file that is missing beside it.
  • ini.file is a plain file name ending in .ini; ini.section has no brackets.
  • Unknown keys are refused.
  • Building the sources (/msi-sources) refuses an own page whose controls do not fit into the dialog in every language; it names how many dialog units the page needs. Split it into two pages or shorten the texts.
en/wiki/msaccess/bootstrapper/reference/msi-settings.txt · Last modified: by Wolfgang van der Stille