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

[BUG]: Microsoft Edge still alive after removal #309

Closed
d3cim opened this issue Jan 12, 2024 · 16 comments
Closed

[BUG]: Microsoft Edge still alive after removal #309

d3cim opened this issue Jan 12, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@d3cim
Copy link

d3cim commented Jan 12, 2024

Description

Microsoft Edge still trying to ping Microsoft after uninstalling it.

OS

Microsoft Windows 10 IoT Enterprise
10.0.19045 Build 19045

Reproduction steps

Install a generic traffic monitor like Wireshark or any good firewall like simplewall and see these pings coming from microsoftedgeupdate.exe happen time to time during a normal session.

The file is stored in C:\Program Files (x86)\Microsoft\EdgeUpdate folder.

Scripts

A custom version between Strict and All.
privacy-script-hard.txt

Screenshots

Additional information

I can also notice msedgewebview2.exe do some requests coming from C:\Program Files (x86)\Microsoft\EdgeWebView\Application\120.0.2210.121 folder.

I don't know if it is something strictly related to MS Edge but blocking them doesn't seem to affect the system usability.

I would like to thank you for your work and your tool.. it is simply amazing..

@d3cim d3cim added the bug Something isn't working label Jan 12, 2024
@d3cim
Copy link
Author

d3cim commented Jan 12, 2024

Here a capture:

"‎12/‎01/‎2024 ‏‎21:41:24","DESKTOP\admin","C:\program files (x86)\microsoft\edgeupdate\microsoftedgeupdate.exe","20.7.47.135","443 (https)","tcp"
"‎12/‎01/‎2024 ‏‎21:41:24","DESKTOP\admin","C:\program files (x86)\microsoft\edgeupdate\microsoftedgeupdate.exe","13.107.42.16","443 (https)","tcp"

@undergroundwires
Copy link
Owner

undergroundwires commented Jan 13, 2024

Could you test uninstalling the updates in an elevated cmd.exe like this and see if it works:

"C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" /uninstall

It would be also nice to test it that it can be reinstalled using:

"C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" /install

I then wonder if these services edgeupdate and edgeupdatem would be left after running the official uninstaller. You can check their existing with following PowerShell:

(Get-Service -Name edgeupdate).StartType
(Get-Service -Name edgeupdatem).StartType

Other option would be to stop updates according to Microsoft docs, but this probably won't work is only designed for enterprises as usual:

reg add "HKLM\SOFTWARE\Policies\Microsoft\EdgeUpdate" /v "UpdateDefault" /t "REG_DWORD" /d "0" /f

Removal of web view would break any third party or Microsoft application that tries to render native Windows browser inside. msedgewebview2.exe is most likely being used by another application in your case, so that one would break if we get rid of web view.

@d3cim
Copy link
Author

d3cim commented Jan 16, 2024

Could you test uninstalling the updates in an elevated cmd.exe like this and see if it works:

"C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" /uninstall

This results in nothing, the file still present in directory.

It would be also nice to test it that it can be reinstalled using:

"C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" /install

This results in an error message:

sefg

I then wonder if these services edgeupdate and edgeupdatem would be left after running the official uninstaller. You can check their existing with following PowerShell:

(Get-Service -Name edgeupdate).StartType
(Get-Service -Name edgeupdatem).StartType

This is the PS results:

fdgdfh

Other option would be to stop updates according to Microsoft docs, but this probably won't work is only designed for enterprises as usual:

reg add "HKLM\SOFTWARE\Policies\Microsoft\EdgeUpdate" /v "UpdateDefault" /t "REG_DWORD" /d "0" /f

I'm on an Enterprise version and I tried to add these reg value but I can notice the service running again.

@ltguillaume
Copy link

ltguillaume commented Jun 17, 2024

It looks like the Edge setup.exe file doesn't allow uninstalling anymore, which is why the batch script https://github.com/ShadowWhisperer/Remove-MS-Edge seems to include an older version of it in order to still be able to.

More changes may come to the uninstallation procedure, now that the EU has forced MS to make it possible to uninstall Edge via official ways.

@undergroundwires
Copy link
Owner

Thanks for the guidance and update @ltguillaume.

It sounds sad to rely on downloading and using a proprietary executable.

What do you think? Should privacy.sexy host this file, download/use it and remove?

@ltguillaume
Copy link

I think it's rather nasty, too, but effectively it's just an older version of the official M$ file.

I'm not sure if/where we can track how/when Edge can be uninstalled for EU users, because making that method available to all users would be preferable: it should prevent anything that could possibly break updates, as was the case in the past.

@ltguillaume
Copy link

This change might allow uninstalling Edge again without using an old setup.exe: https://github.com/AveYo/fox/pull/51/files

@undergroundwires
Copy link
Owner

Using latest setup.exe from C:\Program Files (x86)\Microsoft\Edge\Application\126.0.2592.68\ works fine on Windows 11 23H2.

However, it fails for Windows 10 22H2:

Uninstalling through uninstaller: C:\Program Files (x86)\Microsoft\Edge\Application\126.0.2592.68\Installer\setup.exe
Failed to uninstall, uninstaller failed with exit code 93.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

So the problem is only affects Windows 10 using the latest setup.exe.

Exit code 93 leads also errors for winget: microsoft/winget-cli#1286. We should be watching this issue to see any official explanation.

@ltguillaume, these lines creates "fake existence" of legacy edge app:

New-Item -Path "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" -ItemType Directory -ErrorAction SilentlyContinue -Force 
New-Item -Path "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" -ItemType File -Name 'MicrosoftEdge.exe' -Force 

And interestingly, it actually led to succesfull uninstallation of Edge on Windows 10 22H2 🥳. It means that setup.exe on Windows 10 checking the existence of legacy Edge and rejects uninstallation if it does note exist. I will fix that in a patch release, thank you for another great contribution @ltguillaume.

I can reproduce that the updater is not removed and exist at C:\Program Files (x86)\Microsoft\EdgeUpdate.

@ltguillaume
Copy link

It means that setup.exe on Windows 10 checking the existence of legacy Edge and rejects uninstallation if it does note exist.

Yeah I saw, great, yet another piece of trickery needed to fool M$ then 😛

I'm not sure if EdgeUpdate would then still reinstall Edge (bad) or if it's necessary to still update WebView2 (possibly good if you still want it installed).

Note: I have seen this fail on Windows 11 LTSC 2024 as well, though. I resorted to using the batch script from https://github.com/ShadowWhisperer/Remove-MS-Edge with the older setup.exe to get it removed (that was before I found https://github.com/AveYo/fox/pull/51/files).

@undergroundwires
Copy link
Owner

To close this issue, we need to take decisions about EdgeUpdate.

We could provide a script to delete it but then it will also affect WebView2.
WebView2 relies on EdgeUpdate for updates.

We could add a new category as Remove Edge (Chromium) components with two scripts to keep them separate for advanced users:

  • Remove WebView2
  • Remove Edge updater (disables Edge and WebView2 updates)

Does this make sense? If yes should they be under:

a. Remove bloatware category directly.
b. Add under Remove Windows apps > Remove system apps > . This category was designed for UWP apsp but these are for advanced users and make sense to isolated them outside the main category under more advanced one.
c. Another idea?

@ltguillaume
Copy link

Yes, that would definitely be best imho.

Just put it all under Remove Bloatware > Remove Edge (Chromium), that's great.

@undergroundwires
Copy link
Owner

Most novice user would think way:

I want to remove Edge, let me click on "Remove Edge (Chromium)", and then they get updates and WebView2 uninstalled too.

Separating other stuff (updates + webview2) to Edge components would prevent them from making mistakes i.e. removing, blocking stuff that may be useful.

So a categorization to simplify risk management would be beneficial, but unsure what's the best way.

@ltguillaume
Copy link

ltguillaume commented Jun 21, 2024

That's a good point.

As for option B: I hate the idea that the clear distinction between Windows Store APPS and Win32 PROGRAMS is fading. Everything is called "app" nowadays. For that reason I would even rename Remove Bloatware > Remove Windows apps to Remove Windows Store apps for clarity.

So I wouldn't say the category Remove Windows apps is suited for EdgeUpdate and WebView2.

A category Edge Components would then make more sense, yes.

@undergroundwires
Copy link
Owner

Thanks for feedback, let's leave that category for the apps. And I agree with renaming. I can merge a PR for it as I may forget this change.

I'll add stopping Edge updates + and the fix for Windows 10 and close the issue. We can create a new issue for disabling WebView2 later if we see necessary.

undergroundwires added a commit that referenced this issue Jun 23, 2024
This commit introduces a placeholder ifle creation step necessary for
the uninstallation process of Microsoft Edge on Windows 10, as discussed
in #309. The file simulates the presence of Microsoft Edge (Legacy),
which newer uninstallers check for before proceeding with the
uninstallation.

This change resolves the observed issue where the uninstaller fails to
recognize the absence of Legacy Edge, hindering the uninstallation
process.

Changes:

- Add placeholder file creation/removal for legacy Edge.
- Update and improve the documentation.
undergroundwires added a commit that referenced this issue Jun 25, 2024
This commit adds scripts to block automatic updates for Microsoft Edge
and WebView2 on Windows, aimed at enhancing user privacy as per the
issue #309.

Changes:

- Create a new category for scripts targeting Edge and WebView2 updates.
- Add scripts for disabling automatic update services, scheduled tasks,
  and executable blocking, along with registry configurations.

Other supporting changes:

- Remove comments in code that indicates reusing of small text parts.
  This approach does not encourage creating unique content.
@undergroundwires
Copy link
Owner

0.13.5 is now released 🚀.

Both the removal fix and disabling of auto-updates are released.
Disabling auto-updates are under Configure Programs > Configure Browsers > Configure Edge > Disable Edge and WebView2 automatic updates.
Added also Disable automatic installation of Edge and WebView under this category which is recommended on Standard.

Meanwhile looking at this, added tens of other ways to configure Edge. It resolves lot of privacy issues.

Credit given in release notes to @ltguillaume and @d3cim. Thank you again.

If we want to delete/uninstall WebView2, we can create a new issue. Closing this.

@ltguillaume
Copy link

Fantastic, thank you! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@ltguillaume @undergroundwires @d3cim and others