Opening in Edge since Win10 1709

Issue #29 resolved
Former user created an issue

Since I upgraded to Win10 Fall update (1709), automatically opening links to Edge no longer worked correctly. It opened the bing search page with the url as search query, but it didn't open the clicked URL in the address bar.

I had to change the argument for Edge to the following for it to work.

It was:

<Arguments>microsoft-edge:</Arguments>

Changed to:

<Arguments>microsoft-edge:{0}://{1}</Arguments>

It's probably a bug with default values being filled in for Edge.

Comments (16)

  1. guy repo owner

    Interesting. I never use Edge so never noticed. I will look more into it this weekend.

    i wonder if those changes are backwards compatible. I would here to have to detect which build of Windows.

  2. Martijn Stolk

    Looking in the code I notice the following:

        If InStr(aTarget.Arguments, "{0}") > 0 Or InStr(aTarget.Arguments, "{1}") > 0 Then
            'using replacement, new start
            Dim lParts As GeneralUtilities.URLParts = GeneralUtilities.DetermineParts(aURL)
            lProcess = Process.Start(strBrowser, String.Format(aTarget.Arguments, lParts.Protocol, lParts.Remainder))
        Else
            'no replacement, old start
            lProcess = Process.Start(strBrowser, aTarget.Arguments & " """ & aURL & """")
        End If
    

    So without {0} and {1} there would be a space between "microsoft-edge:" and the URL. When the {0} and {1} are explicitly defined, the space is effectively removed.

    I don't have a PC with the Win10 creator update so I cannot test backward compatibility.

  3. Brian Baker

    I'm seeing this also.

    @martijnst, can you show what the rest of your browser entry looks like for Edge? When I tried to set the arguments as you suggested, it just ends up opening Windows Explorer instead of Edge. Here's mine:

        <Browser>
          <GUID>9f4b9a34-40d2-4dc8-9545-6f074b40e182</GUID>
          <Name>Edge</Name>
          <Category>Browsers</Category>
          <Target>C:\Windows\explorer.exe</Target>
          <IconIndex>0</IconIndex>
          <Image>(Custom)</Image>
          <CustomImagePath>C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\Assets\MicrosoftEdgeSquare44x44.targetsize-48_altform-unplated.png</CustomImagePath>
          <IsActive>false</IsActive>
          <Hotkey>49</Hotkey>
          <PosX>2</PosX>
          <PosY>1</PosY>
          <IsIE>false</IsIE>
          <Arguments>microsoft-edge:{0}://{1}</Arguments>
          <Scale>1</Scale>
          <Shown>true</Shown>
        </Browser>
    
  4. Martijn Stolk

    @holisticdeveloper, seems to be pretty much the same:

        <Browser>
          <GUID>bad60a29-99e4-49ab-ad34-b498c38cdbf2</GUID>
          <Name>Edge</Name>
          <Category>Browsers</Category>
          <Target>C:\Windows\explorer.exe</Target>
          <IconIndex>0</IconIndex>
          <Image>(Custom)</Image>
          <CustomImagePath>C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\Assets\MicrosoftEdgeSquare44x44.targetsize-48_altform-unplated.png</CustomImagePath>
          <IsActive>false</IsActive>
          <Hotkey>49</Hotkey>
          <PosX>2</PosX>
          <PosY>1</PosY>
          <IsIE>false</IsIE>
          <Arguments>microsoft-edge:{0}://{1}</Arguments>
          <Scale>1</Scale>
          <Shown>true</Shown>
        </Browser>
    

    Basically it's like when you execute this in a command prompt: explorer.exe microsoft-edge:https://tikkie.net

    If that also opens explorer for you instead of Edge, are you sure on Windows 10? Or maybe something is misconfigured in your Windows...

  5. guy repo owner

    @martijnst You are correct, without the {0} or {1}, there is a space. This makes windows interpret everything else as an argument. It's the old DOS/Command prompt way to launch an process.

    Edge does things differently since it's a 'metro' app. It needs the parameters to get it working and to be launched as a argument to explorer.exe.

    @holisticdeveloper your file looks correct. Can you confirm which build version you are using of BC2 and Windows?

  6. bostjanh

    I can confirm the issue @holisticdeveloper, the resolution with <Arguments>microsoft-edge:{0}://{1}</Arguments> opens only explorer.

    Windows 10 1709 build 16299.64 (latest updates), Browser Chooser 2 v2.0.3.21514

    PS: Config is the same as the two listed above.

  7. Martijn Stolk

    In that case my Windows installation might have something different and I have no clue what that would be.

    If this problem doesn't occur for anyone else then I suggest no change at all. In that case this is a workaround that works for myself (on two PC's).

  8. bostjanh

    OK, I've done some more testing and here are results:

    1. the fix above works on simple URLs

    2. when URLs are more complex, it will open Explorer window (e.g. https://www.cnn.com?param1=a&param2=b).

    The trigger seem to be "=" character, might be some other characters as well.

    Any new ideas?

  9. Brian Baker

    The whole arguments needs to be enclosed in quotes: "microsoft-edge:{0}://{1}"

    Then it will launch Edge correctly even with values in the querystring.

  10. guy repo owner

    Might have the same for as for #25. Working on a couple of other details will try do a release soon that fixes this and a couple of other issues.

  11. Log in to comment