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.
/checkchecks the file,/msi-sourceswrites the WiX sources from it, andtools/New-StarterMsi.ps1builds the packages.
Where the file lies
The file is named after the project file, in the same folder:
| Project file | Installer settings |
|---|---|
demo.bootstrapper.json (the project file named after demo.exe) | demo.msi.json |
bootstrapper.json | bootstrapper.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:
| Settings | Packages |
|---|---|
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.inibesidedemo.exe, section[Settings]):KEY=value, a check box as1or0. The application reads the file; the starter does not. To tell the application where the file lies, pass its path in the project'sstart.environment, for example"WKL_SETTINGS": "[StarterDir]\[StarterName].ini"(see The project file); the application readsEnviron("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.0clears a check box. - The values are remembered (
HKEY_LOCAL_MACHINEper computer,HKEY_CURRENT_USERper user, keySoftware\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
| Key | Default | Meaning |
|---|---|---|
format | - | Always 1. |
package.name | display.name of the project file | The name under Apps and in the dialogs. |
package.manufacturer | display.publisher of the project file | The publisher. |
package.version | product version of the starter | Two or three numbers; Windows Installer compares only the first three. |
package.upgradeCode | a name GUID of product and scope | The upgrade code; the default stays the same across builds. Set it only to take over a package built before. |
package.icon | none | An .ico for the entry under Apps. |
package.license | none | An .rtf file shown by the dialog license. |
package.banner | the WiX banner | .bmp or .png, 493 x 58 pixels, at the top of the dialogs. |
package.dialogImage | the 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.startMenu | true | A shortcut in the start menu (all users per computer, the user per user). |
shortcuts.desktop | false | A shortcut on the desktop. |
shortcuts.name | package.name | The 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. |
texts | none | Texts 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.changeShowsPages | true | “Change” in the maintenance dialog leads through the own pages again, so their values can be changed later. |
dialogs.exit.launch | false | A 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. |
pages | none | The own pages (see below). |
ini.file | <starter name>.ini | The file name of the INI file beside the starter (demo.ini beside demo.exe). |
ini.section | Settings | The section the values are written to. |
fragments | none | WiX 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 page | Meaning |
|---|---|
id | Letters and digits, starting with a letter, unique; shown with page:<id> in dialogs.install. |
title | The title in the banner (required). |
description | The line below the title. |
controls | The controls (at least one). |
| Key of a control | Meaning |
|---|---|
type | text (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). |
property | The 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. |
label | The label above the control; for text the paragraph itself; for checkbox the text beside the box. Brackets are shown as written. |
hint | A hint below the control in a smaller font. |
default | The value before the person installing changes it; for checkbox 1 or empty, for radio and combo one of the options. |
required | true keeps Next disabled while the value is empty. |
maxLength | The longest value of an edit; 0 for no limit. |
options | The choices of radio and combo: value (stored) and text (shown). |
iniKey | The 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:
scopesnamesmachineand/oruser, each once.dialogs.installbegins withwelcomeand ends withverify, each once, and shows no standard dialog twice: the person installing confirms before anything changes.installFolderbegins with a standard folder of its scope (see the keys) and has a path below it.- Every page of
pagesis shown indialogs.install, and everypage:<id>names a page. licenseindialogs.installneedspackage.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
radioandcombois one of the options; the default ofcheckboxis1or empty. maxLengthapplies toeditonly.languagesnames only cultures of the list;textsonly cultures oflanguages.package.versionis two or three numbers,package.upgradeCodea GUID.- Files have the right ending (
.ico,.rtf,.bmp/.png,.wxs), are relative and without..; when the file is valid,/checkalso names every file that is missing beside it. ini.fileis a plain file name ending in.ini;ini.sectionhas 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.
Related topics
- The project file: the file the installer settings are named after.
- The installer: what the starter does per user after the package has placed it.
- How to: Roll out the starter with an MSI: building and handing over the packages.