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

Doesn't work when edge is fully uninstalled #26

Closed
1 of 2 tasks
androidacy-user opened this issue Dec 6, 2021 · 47 comments
Closed
1 of 2 tasks

Doesn't work when edge is fully uninstalled #26

androidacy-user opened this issue Dec 6, 2021 · 47 comments
Assignees
Labels
bug Something isn't working external cause A program other than MSEdgeRedirect causes the issue patched? A patch has been made to code, released, and needs testing

Comments

@androidacy-user
Copy link

Check List

  • The App appears in the system tray
  • Running microsoft-edge:https://google.com redirects successfully

Describe the bug
I've uninstalled Edge completely using the setup.exe in the application folder. Instead of opening a window, it just shows a white window two or three times and stops.

To Reproduce
Steps to reproduce the behavior:

  1. Search for something in start
  2. Open web results
  3. See described bug

⚠️ File Upload ⚠️

n/a

Desktop (please complete the following information):

  • Windows Version: 11
  • Windows Build: 22000.348

Additional context
n/a

@androidacy-user androidacy-user added the bug Something isn't working label Dec 6, 2021
@rcmaehl rcmaehl self-assigned this Dec 6, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Dec 6, 2021

Are you using Service Mode or Active Mode. I can see this happening for Service Mode, but Active Mode should still work.

@rcmaehl rcmaehl added the awaiting reporter Awaiting response from reporter / submitter label Dec 6, 2021
@androidacy-user
Copy link
Author

I tried both with the same result.

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 6, 2021

I'll look into this for 0.5.0.0. Will probably just need to drop in a placeholder .exe

@androidacy-user
Copy link
Author

Understood

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 6, 2021

If you put any exe in C:\Program Files (x86)\Microsoft\Edge\Application, rename it to msedge.exe, and then try again. Do you get the same result?

@rcmaehl rcmaehl added this to the 0.5.0.0 milestone Dec 6, 2021
@androidacy-user
Copy link
Author

Same result.

@wmaniac
Copy link

wmaniac commented Dec 9, 2021

Hi,

I have uninstalled edge (chromium) and edge legacy using NTlite, then there is nomore microsoft-edge protocol handler.

So your apps will not work.

thank you.

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 10, 2021

Manually launching a replacement msedge.exe in C:\Program Files (x86)\Microsoft\Edge\Application - Works
Running microsoft-edge:https://google.com - Doesn't work

It looks like it might be being routed through backgroundTaskHost.exe so I'll investigate that route.

image

@rcmaehl rcmaehl added help wanted Extra attention is needed and removed awaiting reporter Awaiting response from reporter / submitter labels Dec 10, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Dec 10, 2021

Unfortunately, it looks like there's some sort of protections in place that I haven't figured out yet. If Edge isn't installed, it knows better than to trust C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe but if Edge IS installed, you can replace that file with whatever you want as long as IEFO are set and Windows won't care.

@androidacy-user
Copy link
Author

androidacy-user commented Dec 10, 2021

Would it be possible to "install" some sort of stub and make windows happy? Ie force it to think edge is indeed installed?

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 10, 2021

Would it be possible to "install" some sort of stub and make windows happy? Ie force edge to think edge is indeed installed?

Currently Analyzing the changes between an edge install and one missing. Hopefully it's just a few registry values I have to readd, but we'll see.

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 10, 2021

I've extracted the following registry changes, but it wasn't let me import them directly on my end. This is assuming, of course, that there's not additional checks in place.

Testreg.reg

Edited: Ruled out and trimmed off about 100KB

@rcmaehl rcmaehl pinned this issue Dec 10, 2021
@rcmaehl rcmaehl modified the milestones: 0.5.0.0, 0.6.0.0 Dec 12, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Dec 12, 2021

Due to release deadline. I'm pushing back my investigation to, at least, 0.6.

@rcmaehl rcmaehl removed this from the 0.6.0.0 milestone Dec 17, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Dec 17, 2021

Clearing Milestone until I can investigate the issue and have a rough solution that can be incorporated.

@rcmaehl rcmaehl added the external cause A program other than MSEdgeRedirect causes the issue label Dec 20, 2021
@rcmaehl
Copy link
Owner

rcmaehl commented Jan 3, 2022

@androidacybot I've heard reports this is changed in the latest builds? Can you verify at all?

@androidacy-user
Copy link
Author

@rcmaehl no change. Still blank edge window flashes twice, then complains it can't open edge.

@androidacy-user
Copy link
Author

A rather suboptimal but temporary workaround is to just leave edge in-place. I don't like having extra apps I don't use installed but it works.

@rcmaehl rcmaehl reopened this May 27, 2022
@rcmaehl
Copy link
Owner

rcmaehl commented May 27, 2022

Whoops, meant to actually close the issue. What I get for using mobile github I guess lol

@rcmaehl rcmaehl closed this as completed May 27, 2022
@rcmaehl rcmaehl unpinned this issue May 27, 2022
@kvistgaard
Copy link

I have Edge uninstalled completely (don't remember how I made it but it was using CMD only) and the redirect doesn't work. Please help me understand what to do. Why is this issue closed?

@androidacy-user
Copy link
Author

I have Edge uninstalled completely (don't remember how I made it but it was using CMD only) and the redirect doesn't work. Please help me understand what to do. Why is this issue closed?

Use the removal script linked in the README instead of manually removing

@AveYo
Copy link

AveYo commented Aug 22, 2022

@rcmaehl, can you please adjust your solution's uninstall in order to NOT remove Programdata\ie_to_edge_stub.exe?
My script's uninstall does not remove it, it's commented out:

:remove
del /f /q "%ProgramData%\ChrEdgeFkOff.*" "%MSEPath%chredge.exe" >nul 2>nul
rem del /f /q "%ProgramData%\ie_to_edge_stub.exe"

It reduces the need to reinstall Edge just for the stub and then remove it again.

In other news I've adjusted ChrEdgeFkOff to play nicer with your solution:

  • if Edge was removed, then ChrEdgeFkOff was installed and then removed, it left a blank path in the registry, and when users tried MSEdgeRedirect it would not do anything.
  • you don't have to do anything, but for future-proofing it's probably safer to make sure HKCR\microsoft-edge\shell\open\command and HKCR\MSEdgeHTM\shell\open\command are set appropriately

@rcmaehl
Copy link
Owner

rcmaehl commented Aug 22, 2022

@rcmaehl, can you please adjust your solution's uninstall in order to NOT remove Programdata\ie_to_edge_stub.exe? My script's uninstall does not remove it, it's commented out:

:remove
del /f /q "%ProgramData%\ChrEdgeFkOff.*" "%MSEPath%chredge.exe" >nul 2>nul
rem del /f /q "%ProgramData%\ie_to_edge_stub.exe"

It reduces the need to reinstall Edge just for the stub and then remove it again.

In other news I've adjusted ChrEdgeFkOff to play nicer with your solution:

  • if Edge was removed, then ChrEdgeFkOff was installed and then removed, it left a blank path in the registry, and when users tried MSEdgeRedirect it would not do anything.
  • you don't have to do anything, but for future-proofing it's probably safer to make sure HKCR\microsoft-edge\shell\open\command and HKCR\MSEdgeHTM\shell\open\command are set appropriately

I'm assuming you mean

RegDelete($sHive & "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ie_to_edge_stub.exe")

Okay, I can remove that.

@AveYo
Copy link

AveYo commented Aug 22, 2022

Not the registry, the actual file in ProgramData.

@rcmaehl
Copy link
Owner

rcmaehl commented Aug 22, 2022

Not the registry, the actual file in ProgramData.

WHOOPS. That should be fixed now.

@AveYo
Copy link

AveYo commented Aug 22, 2022

Thank you!
A user was doing multiple install / remove with all our solutions and complained it's not working - and that was because the stub got deleted along the way.

I haven't looked at your code, but it seems you only check for IFEO ie_to_edge_stub.exe presence.
But in the scenario above (user playing with ChrEdgeFkOff toggle after Edge_Removal), those reg keys can be removed.
So it's better to alternatively check if ProgramData\ie_to_edge_stub.exe exists, and if so, add all the redirection reg keys yourself rather than only modify existing, so that you can make use of the stub regardless.

reg add "HKCR\microsoft-edge" /f /ve /d URL:microsoft-edge >nul
reg add "HKCR\microsoft-edge" /f /v "URL Protocol" /d "" >nul
reg add "HKCR\microsoft-edge" /f /v "NoOpenWith" /d "" >nul
reg add "HKCR\microsoft-edge\shell\open\command" /f /ve /d "\"%ProgramData%\ie_to_edge_stub.exe\" %%1" >nul
reg add "HKCR\MSEdgeHTM" /f /v "NoOpenWith" /d "" >nul
reg add "HKCR\MSEdgeHTM\shell\open\command" /f /ve /d "\"%ProgramData%\ie_to_edge_stub.exe\" %%1" >nul
reg add "%IFEO%\ie_to_edge_stub.exe" /f /v UseFilter /d 1 /t reg_dword >nul >nul
reg add "%IFEO%\ie_to_edge_stub.exe\0" /f /v FilterFullPath /d "%ProgramData%\ie_to_edge_stub.exe" >nul
reg add "%IFEO%\ie_to_edge_stub.exe\0" /f /v Debugger /d "%ProgramFiles%\MSEdgeRedirect\MSEdgeRedirect.exe" >nul
reg add "%IFEO%\msedge.exe" /f /v UseFilter /d 1 /t reg_dword >nul
reg add "%IFEO%\msedge.exe\0" /f /v FilterFullPath /d "%MSE%" >nul
reg add "%IFEO%\msedge.exe\0" /f /v Debugger /d "%ProgramFiles%\MSEdgeRedirect\MSEdgeRedirect.exe" >nul

@rcmaehl
Copy link
Owner

rcmaehl commented Aug 22, 2022

Thank you! A user was doing multiple install / remove with all our solutions and complained it's not working - and that was because the stub got deleted along the way.

I haven't looked at your code, but it seems you only check for IFEO ie_to_edge_stub.exe presence. But in the scenario above (user playing with ChrEdgeFkOff toggle after Edge_Removal), those reg keys can be removed. So it's better to alternatively check if ProgramData\ie_to_edge_stub.exe exists, and if so, add all the redirection reg keys yourself rather than only modify existing, so that you can make use of the stub regardless.

reg add "HKCR\microsoft-edge" /f /ve /d URL:microsoft-edge >nul
reg add "HKCR\microsoft-edge" /f /v "URL Protocol" /d "" >nul
reg add "HKCR\microsoft-edge" /f /v "NoOpenWith" /d "" >nul
reg add "HKCR\microsoft-edge\shell\open\command" /f /ve /d "\"%ProgramData%\ie_to_edge_stub.exe\" %%1" >nul
reg add "HKCR\MSEdgeHTM" /f /v "NoOpenWith" /d "" >nul
reg add "HKCR\MSEdgeHTM\shell\open\command" /f /ve /d "\"%ProgramData%\ie_to_edge_stub.exe\" %%1" >nul
reg add "%IFEO%\ie_to_edge_stub.exe" /f /v UseFilter /d 1 /t reg_dword >nul >nul
reg add "%IFEO%\ie_to_edge_stub.exe\0" /f /v FilterFullPath /d "%ProgramData%\ie_to_edge_stub.exe" >nul
reg add "%IFEO%\ie_to_edge_stub.exe\0" /f /v Debugger /d "%ProgramFiles%\MSEdgeRedirect\MSEdgeRedirect.exe" >nul
reg add "%IFEO%\msedge.exe" /f /v UseFilter /d 1 /t reg_dword >nul
reg add "%IFEO%\msedge.exe\0" /f /v FilterFullPath /d "%MSE%" >nul
reg add "%IFEO%\msedge.exe\0" /f /v Debugger /d "%ProgramFiles%\MSEdgeRedirect\MSEdgeRedirect.exe" >nul

I'll get that implemented. Thank you.

rcmaehl added a commit that referenced this issue Oct 3, 2022
@sdzkHelince
Copy link

Hello, I removed Edge using AveYo's Edge Remover, but when installing MSER, I can't choose "Removed via AveYo's method", so I choosed Edge Stable. After that, redirecting works, but when I use internet search in start menu, it searches in bing (i chose google).

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 2, 2022

Hello, I removed Edge using AveYo's Edge Remover, but when installing MSER, I can't choose "Removed via AveYo's method", so I choosed Edge Stable. After that, redirecting works, but when I use internet search in start menu, it searches in bing (i chose google).

Please try the latest test build:

https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

@sdzkHelince
Copy link

Hello, I removed Edge using AveYo's Edge Remover, but when installing MSER, I can't choose "Removed via AveYo's method", so I choosed Edge Stable. After that, redirecting works, but when I use internet search in start menu, it searches in bing (i chose google).

Please try the latest test build:

https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

I tried, no luck. Also, tried couple times reinstalling edge and deleting again. Didn't help.
изображение

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 2, 2022

I'll get this fixed for the 0.7.3.0 release

@rcmaehl rcmaehl reopened this Dec 2, 2022
rcmaehl added a commit that referenced this issue Dec 26, 2022
@rcmaehl
Copy link
Owner

rcmaehl commented Dec 26, 2022

Hello, I removed Edge using AveYo's Edge Remover, but when installing MSER, I can't choose "Removed via AveYo's method", so I choosed Edge Stable. After that, redirecting works, but when I use internet search in start menu, it searches in bing (i chose google).

Please try the latest test build:
https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

I tried, no luck. Also, tried couple times reinstalling edge and deleting again. Didn't help. изображение

Please try the new test build and let me know if that improves things:

https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

@sdzkHelince
Copy link

@rcmaehl No, it does not. But, I actually understood the reason why it didn't work. I have Windows installed on A: drive, but you hardcoded it (at least i guess) to C: drive. Sorry if I made you make more work 😥

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 27, 2022

@rcmaehl No, it does not. But, I actually understood the reason why it didn't work. I have Windows installed on A: drive, but you hardcoded it (at least i guess) to C: drive. Sorry if I made you make more work 😥

image

I knew this would eventually come for me. Should be a mostly easy fix at least. Just tedious.

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 27, 2022

@rcmaehl No, it does not. But, I actually understood the reason why it didn't work. I have Windows installed on A: drive, but you hardcoded it (at least i guess) to C: drive. Sorry if I made you make more work 😥

I've corrected that for the latest test build. Same URL as always:

https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

@sdzkHelince
Copy link

@rcmaehl No, it does not. But, I actually understood the reason why it didn't work. I have Windows installed on A: drive, but you hardcoded it (at least i guess) to C: drive. Sorry if I made you make more work 😥

I've corrected that for the latest test build. Same URL as always:

https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

ye, it works now!

@rcmaehl
Copy link
Owner

rcmaehl commented Dec 29, 2022

@rcmaehl No, it does not. But, I actually understood the reason why it didn't work. I have Windows installed on A: drive, but you hardcoded it (at least i guess) to C: drive. Sorry if I made you make more work 😥

I've corrected that for the latest test build. Same URL as always:
https://nightly.link/rcmaehl/MSEdgeRedirect/workflows/MSER/0.8.0.0-dev/mser.zip

ye, it works now!

image

@rcmaehl rcmaehl closed this as completed Dec 29, 2022
@kristibektashi
Copy link

@rcmaehl no change. Still blank edge window flashes twice, then complains it can't open edge.

That blank window is actually a UWP window that spawns because Windows tries to open Edge Legacy (which is the fallback browser for when Chromium Edge is removed), but because the binaries for Edge Legacy have been removed in Windows 11 and recent Windows 10 versions, it just opens a blank window then shows an error.

I don't know if you already knew this of it this is in any way helpful, but I thought it was worth mentioning.

@rcmaehl
Copy link
Owner

rcmaehl commented May 4, 2023

@rcmaehl no change. Still blank edge window flashes twice, then complains it can't open edge.

That blank window is actually a UWP window that spawns because Windows tries to open Edge Legacy (which is the fallback browser for when Chromium Edge is removed), but because the binaries for Edge Legacy have been removed in Windows 11 and recent Windows 10 versions, it just opens a blank window then shows an error.

I don't know if you already knew this of it this is in any way helpful, but I thought it was worth mentioning.

Good to know. Thank you

@palexdev
Copy link

palexdev commented Nov 2, 2023

@rcmaehl Sorry to comment on a closed issue, but I still cannot make it work.
What if Edge was removed through a custom ISO such as Tiny11?
To be precise, this is what I have:
image

If I run microsoft-edge:https://google.com I get this:
image

(I'm using v0.8.0.0)

@kristibektashi
Copy link

@palexdev You can try reinstalling Edge then just using MSEdgeRedirect as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external cause A program other than MSEdgeRedirect causes the issue patched? A patch has been made to code, released, and needs testing
Projects
None yet
Development

No branches or pull requests

8 participants