A
A
Andrey Chereshnev2020-05-09 14:42:57
JavaScript
Andrey Chereshnev, 2020-05-09 14:42:57

How to run bat file from electron.js application?

There is a .bat file that needs to be run from the electon.js application, how can I run it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Tyvaniuk, 2020-05-09
@Andryhv

You can use the shell from the main process

const {shell} = require('electron');
shell.openItem(app.getAppPath() + '\\local\\my-file.bat');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question