How to: Roll out the starter with an MSI
In a managed environment software reaches a PC only through the IT's deployment, as a signed Windows Installer package. The starter of an application is therefore installed once as such a package; from then on it brings every new version of the application itself, for each user, without the IT deploying again.
Solution overview
tools\New-StarterMsi.ps1 builds the package from the project file and the starter EXE. Without installer settings it is
the package of earlier releases:
- per computer, into
Program Files (x86)\WKL\<product>, where users cannot change the starter or its project file; - a shortcut in the start menu of all users (with
/RUNCFGonly when the starter would not find the project file by itself); - the logo the project names, when it lies beside the project file;
- an UpgradeCode made from the product key, so every later package of the product replaces the earlier one;
- signed when a code signing certificate is named.
In version 2.3.0 and later, <name>.msi.json beside the project file describes more (see
The installer settings): a package per user besides or instead of the one per computer,
dialogs in five languages with own pages whose values go to <name>.ini beside the starter, the license, pictures and WiX
fragments of the publisher. The script then builds one package per scope and language.
Implementation
- Put
Wkl.Bootstrapper.exebeside the project file, and the logo if the project names one. Check the project file, and the installer settings when there are any:
Wkl.Bootstrapper.exe /check bootstrapper.json Wkl.Bootstrapper.exe /check bootstrapper.msi.json
Build the package (requires the WiX Toolset command line
wix, version 6 or later):.\tools\New-StarterMsi.ps1 -Project \\server\amed\deploy\bootstrapper.json -Version 1.0.0 ` -CertificateThumbprint <thumbprint of the code signing certificate>
The packages go beside the project file (
-OutputFoldernames another folder); the script prints the path of each. The sources are written by the starter of the script's release (Wkl.Bootstrapper.exeone folder abovetools, 2.3.0 or later); an older starter is refused without being started.- Hand the package to the IT for deployment (group policy, Intune or Configuration Manager).
Remarks
- Raise
-Versionfor every package the IT is to deploy. Windows Installer replaces an installed package only with a higher version. A package is needed only when the starter or the project file changes, not for a new version of the application: that one the starter brings from the source. - The default version is
package.versionof the installer settings, else the product version of the starter EXE; name one when only the project file changed. - Values of own pages can be given without dialogs:
msiexec /i <package> /qn SERVER=... MODE=...(see The installer settings). - Without
-CertificateThumbprintthe package is not signed. Managed environments usually refuse unsigned packages. Signing needssigntool.exeof the Windows SDK and reaches the time stamp server (-TimestampUrl, default DigiCert). - The package installs only the starter. Prerequisites of the computer (Microsoft Access or its runtime, ODBC drivers for all users, components registered for all users) belong to the IT's own packages; the starter checks them with the project's
conditionsand reports what is missing. - Users start the application from the start menu. The starter then works in the user's profile only, as described in How to: Deliver an application with the bootstrapper.
- Name
sourceas a share or an absolute path. A relativesource(for exampledeploy, as/new-projectwrites it) resolves against the starter's folder, which after the installation isProgram Files (x86)\WKL\<product>. The installed starter then stops with code 12, while/checkand/whatifbeside the project file report nothing, because the relative path resolves there (The folder with the application cannot be reached (code 12)). - Two entries under Apps carry the name of the application. The package registers the starter for the computer; removing that entry removes the starter and its project file, needs administrator rights, and is the IT's task. At its first start the starter adds an entry for each user for the installed application; removing that one removes the application from the user's profile (
/uninstall). Both showdisplay.nameof the project file, else the product key.
Related topics
- How to: Publish a signed delivery - the delivery key that lets the starter take only the publisher's deliveries.
- The project file (format 2) - every member of the project file.
- How to: Move from the former starter - making the project file from a StarterPro configuration.