I want to generate a unique .exe file to execute the app or a .msi to install the application. How to do that?
There are so many good modules which generate single installer *exe file. Check out any of these:
electron-builder (genrates executable for Windows,Mac and Linux, have server-less app auto-update feature,code signing, publishing etc, less boilerplate)
electron-forge (genrates executable for Windows,Mac and Linux, it not just package apps but helps you create them as well, more boilerplate)
windows-installer (easy to use, light weight, and generates only exe file)
(still confused which one to pick? compare here)