Giter Club home page Giter Club logo

Comments (2)

complexlogic avatar complexlogic commented on May 16, 2024

Flex Launcher assumes that the launched executable won't return until the user has closed the application. The problem is that the Edge executable doesn't behave the way most programs do. The msedge.exe is really just a launcher. It works by forking a new process for the browser window, and then immediately returns. Chrome and Firefox on Windows also have the same behavior. So when you launch the Edge executable, it will successfully create a browser window, but Flex Launcher will re-grab the window focus almost immediately after, mistakenly thinking that Edge has closed.

As a workaround, you can use the following script to block until Edge has closed. Change the path to the msedge.exe if necessary.

@echo off
start "msedge" "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

:loop
tasklist /FI "ImageName eq msedge.exe"  | find /i "msedge" > nul || goto :done
timeout /t 2 >nul
goto :loop

:done

It works by checking every 2 seconds to see if there are any Edge processes running, and it won't return until there are none.

Paste it into a .bat file, and then you can structure your menu entry like so:

Entry1=Browser;.\assets\icons\system.png;"C:\path\to\scripts\launch_edge.bat"

Eventually, I will incorporate similar logic into Flex Launcher itself, but you may use this workaround for the time being.

from flex-launcher.

complexlogic avatar complexlogic commented on May 16, 2024

This issue is fixed in the latest release, v1.3. The logic from the above script is now incorporated directly into the launcher. Upon program launch, the launcher will check the image name of the resulting process, and, if it matches chrome.exe, msedge.exe, or firefox.exe, then it will wait until all processes of the same name have terminated before returning to the launcher screen. Launching a web browser via a shortcut to it's .exe is allowable.

from flex-launcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.