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:
- Every file in the Program Files\Manufacturer\Product folder
- node.exe in Files\Manufacturer\Product
- nssm.exe in Files\Manufacturer\Product
- Register the service as a Windows Service
- A shortcut in the start menu to the url of the web application
Every component installed is properly rolled back on uninstall.
- node.exe is an small file and an standalone file
- we don't want to mess with other applications
You need WIX, node.js, nssm.exe.
There paths hardcoded all over the example but if something fails you get a very good message.
Run installer\build.ps1 on powershell.
First the script will copy everything to a temporary directory excluding directories such as .git.
Then we run WIX heat.exe to generate a wxs of all our files with a ComponentGroup (installer\directory).
MIT - Auth10 2013