Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge Dev is not found #80

Open
leumasme opened this issue Mar 31, 2023 · 2 comments · May be fixed by #81
Open

Edge Dev is not found #80

leumasme opened this issue Mar 31, 2023 · 2 comments · May be fixed by #81
Labels
pull request welcome A pull request is welcome

Comments

@leumasme
Copy link

leumasme commented Mar 31, 2023

See Downstream Issue: httptoolkit/httptoolkit#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 Menu C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Edge Dev.lnk.
The definition file for Edge does not mention edge dev at all.

exports.msedge = {
bin: 'msedge.exe',
find: function () {
this.programFiles('Microsoft\\Edge Beta\\Application')
this.programFiles('Microsoft\\Edge\\Application')
this.startMenu()
}
}

The Paths for Edge and Edge Beta are defined, and this.startMenu().
Finder.prototype.startMenu = function (startEntry) {
// eg, 'Google Chrome' or 'iexplore.exe'
startEntry || (startEntry = this.bin)
this.registry(
'Clients\\StartMenuInternet\\' + startEntry +
'\\shell\\open\\command'
)
}

This 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 that startMenu 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:

  • Add default install path for Microsoft Edge Dev
  • Make sure that 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.
@vweevers
Copy link
Owner

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.

@vweevers vweevers added the pull request welcome A pull request is welcome label Mar 31, 2023
@leumasme
Copy link
Author

leumasme commented Mar 31, 2023

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.

@leumasme leumasme linked a pull request Mar 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request welcome A pull request is welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants