Convert Web Applications to Windows Executable File

Aashu
2 min readOct 15, 2022

--

  • Prerequisite node and npm should be installed on your system.
  • There are multiple ways of doing the same and over here will be using nativefier which is a wrapper for electron js.
  • create a directory where you have to save your project.
  • then in the same directory run the below command
    npm install -g nativefier which will install nativefier on your system.
  • now run the npm command to create a nativefier application which will open your web application on windows as application.
    nativefier — name ‘application_name’ ‘web_application_url’
  • After successfully running the npm command a folder(example-application-win32-x64) will get created in the directory (which contains electron code auto generated using nativefier).
  • Now for running the application in folder there is a executable file which will open the web app on windows as windows application.
  • nativefier/README.md at master · nativefier/nativefier for reference you can use nativefier documentation.
  • As your application is generated but for sharing purpose it’s bit difficult sharing whole folder with customer. So, now we will convert this folder into a executable installer.
  • Firstly, install electron-winstaller for that run below npm command in the same folder.
    npm install electron-winstaller
  • create a new folder for installer with preferred naming convention (example — application_name_installer).
  • Then, in the created directory create build.js file and push the below content in the file.
  • on cmd run node build.js for creating the application installer.
  • after successfully running the command open the outputDirectory there you will find the shareable executable file.

--

--

Aashu
Aashu

No responses yet