I am creating an Eletron desktop application for Windows. I am using electron-packager
and then electron-squirrel-startup
to create an .exe file. Like in this tutorial:
https://ourcodeworld.com/articles/read/365/how-to-create-a-windows-installer-for-an-application-built-with-electron-framework
I would like to add installation of Python to the installer. Does anyone know how to do it?
My guess is somewhere here in main.js file:
function handleSquirrelEvent(application) {
switch (squirrelEvent) {
case '--squirrel-install':
case '--squirrel-updated':
//HERE
but I'm not sure.
Edit:
My idea was to use node-cmd
module to execute Windows cmd
commands, yet for some reason code like this
var cmd=require('node-cmd');
cmd.run('touch example.txt');
does not work in the handleSquirrelEvent
function. It works outside of it though.