Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Restore a minimized windows application from electron application

I am working on launching a windows application.exe from an electron application with a button click. The first button click will launch the application.exe and when the button is again clicked for the second time, the program checks from the running process of the application.exe. If the windows application is not running, exe will be executed, but if the application is already running and minimized. The electron app window should restore the minimized windows application focus the application on the screen.

I have achieved till launching and checking whether the application is already running or not using child process and task list. Just need help to restore the minimized window and set focus.

    let executablePath = "";
let currentWindow = window.require("electron").remote.getCurrentWindow();
    child('tasklist', function(error, stdout, stderr) {
            var lines = stdout.trim().split("\n");  
            var processes = lines.slice(2);   
            var parsed = processes.map(function(process) {
                return process.match(/(.+?)[\s]+?(\d+)/); 
            });
            var filtered = parsed.filter(function(process) {
                return /^AppName/.test(process[1]);  
            }); 
            if(filtered.length > 0){  
                currentWindow.minimize();
            }
            else{ 
                child(executablePath, function(err, data) {
                    if(err){
                    console.error(err.message);
                    return;
                    }
                });
            }
        });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!