none
Shell function for Microsoft Edge does not work RRS feed

  • Question

  • I have an app that shell's several programs with no drama. I also have 3 web sites that do not respond to login data with Firefox.

    My app currently is using shell to load Firefox without incident, however changing destination to Microsoft Edge (to resolve the login issues), my app just sits there doing nothing.

    this is the location of Microsoft Edge: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe

    Any suggestions much appreciated, Thanks

    Friday, February 14, 2020 2:38 AM

Answers

  • This works for me (Windows 10) =>

    Dim sEdgePath As String = "shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
    Process.Start(sEdgePath)

    • Marked as answer by x38class Sunday, February 16, 2020 3:12 AM
    Friday, February 14, 2020 7:58 AM

All replies

  • Assuming when running shell on Edge with 

    C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe

    That Edge open and if so open Edge's developer tools and see if there are error reported.

    If Edge does not open have you verified the path is correct?


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Friday, February 14, 2020 3:03 AM
    Moderator
  • This works for me (Windows 10) =>

    Dim sEdgePath As String = "shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
    Process.Start(sEdgePath)

    • Marked as answer by x38class Sunday, February 16, 2020 3:12 AM
    Friday, February 14, 2020 7:58 AM
  • Thanks Karen & Castorix31 for replying, yes, Karen location is correct.

    Castorix31, your suggestion does shell Microsoft Edge, however after 30 seconds my app reports:

    Unhandled exception: Exception of Type:

    "system.outofmemoryexception" was thrown, (edge is still visible)how do I resolve this which did not happen when firefox was shelled?

    Saturday, February 15, 2020 2:28 AM
  • I cannot reproduce this problem

    with an empty application and a button where I just add this code...

    or simply with :

    Process.Start("Microsoft-edge:")

    • Edited by Castorix31 Saturday, February 15, 2020 8:40 AM
    Saturday, February 15, 2020 8:28 AM
  • Thanks Castorix31 for staying with me.

    i have found the problem, after the shell I need to know that it has actually started, so I have a loop until it is registered, by checking processes, only problem is by looking at task manager it shows as "Microsoft Edge", but in the code below it is registered as "MSEdge" so the loop never found the app running, therefore a memory problem.

     ProgramName was "Microsoft Edge" but now with "MSEdge" the loop exits, this was not an issue with Firefox as it was also reported as Firefox                     

    Dim prog As New Process

    dim d as short

    Do until d=1

    For Each prog In Process.GetProcesses
            If Mid(UCase(prog.ProcessName), 1, Len(UCase(ProgramName))) = UCase(ProgramName) Then
                   d=1
             End If
    Next

    loop

    So my next question will be how do I report only the active apps I have running which is in the top half of the task manager display? (which does show "Microsoft Edge")

    Sunday, February 16, 2020 3:12 AM
  • So my next question will be how do I report only the active apps I have running which is in the top half of the task manager display? (which does show "Microsoft Edge")
    Start another thread for another question to improve the visibility of answers
    Sunday, February 16, 2020 10:46 AM