How to open windows executable (.exe) applications inside electron window


I want to build a desktop application which can:

  1. Listen on a port for any request (request will be from another server/web application)
  2. Open desired desktop app (executable file or .exe) in electron window.

I know electron is very powerful but want to know if electron can open desktop executable application inside a window.

This group has many talented brain, if any can help me. I am very new to electron so any slightest help is also very appreciated.


Define “inside a window”. Electron can very easily tell your operating system to open another program. I don’t know what you mean by “inside a window”, though.


Thanks for taking time to reply. “Inside a window” means inside “BrowserWindow” of electron. Say I want capability to switch between 2 desktop apps using electron. Only one app should be visible at a time and other hidden. So I was thinking if electron can put each app in a “BrowserWindow” then via main.js we can control the visibility.

If electron can’t put desktop (.exe) app in a “BrowserWindow” then do we have any other option in electron that can control visibility/switching of these 2 desktop (.exe) applications?


Yes, it’s called alt-tab.

Seriously though, GUI programs like that are not designed to be run in electron, and I don’t see how you think it would work. It should be possible to tell the OS to minimise windows (maybe?). If the program is actually just a CLI tool, then you can run it with child_process.


The main purpose is to control visibility of these desktop apps from some web application running in browser. Want to check if electronJS is right choice for this scenario.


Using Electron is incompatible with running a web app in the browser. Electron is a browser, for all intents and purposes.