This is an example of how to build a Windows MSI installer for a node.js server application using WiX.
The msi installer will install:
- All files of the project root folder (except for excluded files).
- node.exe to run the program.
- nssm.exe to register a service.
- A shortcut in the Start menu to the url of the web application
By default it will install to C:\Program Files (x86)\My Manufacturer\My Application
. Every component installed is rolled back on uninstall.
You need to have WiX Toolset 3.11 and node.js installed.
The paths are hardcoded but if something fails you get a very good message.
- Open a new powershell.
- Enable execution of powershell scripts by entering:
Set-ExecutionPolicy RemoteSigned
- Navigate into the installer directory.
- Run
.\build.ps1
on powershell. - Find the installer under
installer/output/installer.msi
. - Also make sure to add the generated Guid file under
installer/guid.txt
to your repository and never change it.
You can edit the files inside installer/resources
to apply your company design.
The icon under public/favicon.ico
is used for the shortcut in the Windows Start menu and for the entry under Windows Add/Remove Software.
Enter your company name and product name in the according fields in installer/en-us.wxl
.
If you want to exclude files from WiX so it will not be installed have a look at installer/exclude_files.xslt
and add your files.