Open leumasme opened 1 year ago
startMenu works (in general) because of the || (startEntry = this.bin)
. Whether it works for Edge doesn't really matter if we can find Edge through other means.
PR is welcome to add the install path of Edge Dev. That should suffice.
I'll make a PR.
I'd like to also add channel detection for Edge.
Sadly the edge binary does not actually have metadata that indicates that it is a beta.
The fact that it's a beta/dev version seems to be mainly signaled by a msedge.VisualElementsManifest.xml
file in the same folder as the binary.
Is it okay to read this file in the post
function of the detection and then check the channel via regex? One may argue that this is rather slow (with modern AV programs intercepting every new file open). The alternative is assuming that it's always installed in the default path and just getting the channel from that.
See Downstream Issue: https://github.com/httptoolkit/httptoolkit/issues/401
I have installed MS Edge Dev via winget. The application is present in the default install directory
C:\Program Files (x86)\Microsoft\Edge Dev\Application
and in the Start MenuC:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Edge Dev.lnk
. The definition file for Edge does not mention edge dev at all. https://github.com/vweevers/win-detect-browsers/blob/8f5df151f1e495564058ab50b0894577a51ced0b/lib/browsers.js#L113-L121 The Paths for Edge and Edge Beta are defined, andthis.startMenu()
. https://github.com/vweevers/win-detect-browsers/blob/8f5df151f1e495564058ab50b0894577a51ced0b/lib/finder.js#L157-L165This argument is not provided which, from what I see, would always result in an invalid registry path being checked (argument is stringified to "undefined").The argument is not provided falls back to the binary name which doesnt work for Edge. Edge Dev would be present in the registry path thatstartMenu
checks, if the check was working correctly. (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet\Microsoft Edge Dev\shell\open\command
exists)What needs to be done:
startMenu()
is really a valid usage of the function; plenty of your definitions use it without argument but this will never work from what I understand.