WiX based Windows installer for GPII
This code is pulled and executed from GPII/gpii-app's Installer.ps1 provisioning script and can be called manually, but the latter is only for people that are familiar to this code.
Make sure MSBuild and the WiX folder are in the path.
The staging
folder is where the content is going to be placed before building the installer.
After running setup.msbuild
, an MSI file can be found in the output
folder.
The installer is a standard MSI file and as such it can be also executed using msiexec.exe
and supports all the command-line options available to msiexec.exe
.
To perform an unattended installation (requires administrative rights):
msiexec /qn /i GPII.msi
To perform an unattended installation and keep a verbose log to log.txt
:
msiexec /qn /lv log.txt /i GPII.msi
To silently uninstall:
msiexec /qn /x GPII.msi
You can pass a number of property key/values to the installer to customize its behavior.
For example, to perform an unattended installation to C:\GPII
:
msiexec /qn /i GPII.msi INSTALLFOLDER=C:\GPII
To perform an unattended installation to C:\GPII
that creates no desktop shortcuts:
msiexec /qn /i GPII.msi INSTALLFOLDER=C:\GPII ADDLOCAL=GPIIFeature,VCRedist DESKTOP_SHORTCUTS=0
The list of possible properties include:
Name | Value | Description |
---|---|---|
INSTALLFOLDER | A folder name Default: C:\Program Files\GPII or C:\Program Files (x86)\GPII |
The installation folder |
ADDLOCAL | Comma (,) separated list </br/>Possible values:
|
The GPII features that will get installed. It is advisable to always include GPIIFeature (the main GPII platform) and VCRedist (the Visual C++ Redistributable Package). |
SHORTCUTS | 0 or 1 (Default) |
Whether or not to create any desktop and start menu shortcuts |
DESKTOP_SHORTCUTS | 0 or 1 (Default) |
Whether or not to create any desktop shortcuts |
START_MENU_SHORTCUTS | 0 or 1 (Default) |
Whether or not to create any start menu shortcuts |
GPII_SHORTCUTS GPII_DESKTOP_SHORTCUTS GPII_START_MENU_SHORTCUTS |
0 or 1 (Default) |
Whether or not to create shortcuts for the main GPII platform |
An exhaustive list of other properties can be found at the Windows Installer Guide.