const child = spawn(
'cmd.exe',
[
'/K',
path.join(getBinariesDirectoryPath(), 'GenericEXE_livestream.exe'),
'--ip_address',
`${cameraData.camera.ip}`,
'--username',
`${cameraData.camera.user}`,
'--password',
`${cameraData.camera.password}`,
'--channel_no',
`${cameraData.camera.channel}`,
'--rtsp_port_no',
`${cameraData.camera.rtsp}`,
'--cctv_id',
`${cameraData.camera.currentBranch[1]}`,
// '--jwt_token',
// `${token}`,
'--branch_id',
`${cameraData.camera.currentBranch[0][0].id}`,
'--dashboard_url',
`${URL}`,
'--fps',
`${cameraData.camera.fps}`,
'--branch_name',
`${cameraData.camera.currentBranch[0][0].branch_name}`,
],
options
);
child.on('error', function(err) {
alert(err);
});
child.unref();`
I am trying to run a python executable from the electron app using spawn. In development mode, it works. When making an exe package for production, on one windows machine it works but not on another machine. The previous version of the same electron app was working on the other machine but after adding 2-3 args it stopped working on the other machine. Been bugging me the whole day.