winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Prevent uninstallation of Microsoft Edge stable

Open pratyakshm opened this issue 4 years ago • 22 comments

Description of the new feature/enhancement

I request that WinGet must block uninstallation of Microsoft Edge stable since the browser is basically tightly integrated to the OS and uninstalling it might cause OS instability including but not limited to issues like failed Windows Updates and broken features.

Proposed technical implementation details (optional)

I do not have any code snippets to share at this moment. But a technical thing I suggest is printing an error message when winget uninstall Microsoft.Edge (or any similar command to uninstall the stable version of Microsoft Edge) is used. Maybe something simple like "WinGet does not support uninstallation of this app".

pratyakshm avatar Jul 15 '21 08:07 pratyakshm

I say leave it. if you are smart enough to know how to manually uninstall it using a shell, you are probably smart enough to figure out how to re-register it too

Masamune3210 avatar Jul 15 '21 11:07 Masamune3210

I say leave it. if you are smart enough to know how to manually uninstall it using a shell, you are probably smart enough to figure out how to re-register it too

I tend to agree that if users want to be able to remove it, they should be able to. However, I don't think it should be without warning. I could easily see a young tech enthusiast who always uses Google Chrome or Firefox thinking they would be smart and uninstall Microsoft Edge, not realizing how many windows features depend on edge.

I would propose that in this specific case, the user be warned that Edge is a dependency for Windows features, and removing it may cause system instability or remove access to some features, requiring a confirmation before proceeding with the uninstall

Trenly avatar Jul 15 '21 15:07 Trenly

That I will agree with being a good idea, not everyone is ready to learn by burning down their boat so to speak

Masamune3210 avatar Jul 15 '21 18:07 Masamune3210

I have just uninstalled MS edge using winget, I'm now finding a way to reinstall it as a system app

zhangzp9970 avatar Oct 31 '21 14:10 zhangzp9970

Just download one from MS store and everything will be back.

zhangzp9970 avatar Oct 31 '21 15:10 zhangzp9970

Uninstallation of Microsoft Edge fails with exit code 93.

> winget uninstall -e --id Microsoft.Edge
Found Microsoft Edge [Microsoft.Edge]
Starting package uninstall...
Uninstall failed with exit code: 93

> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

the user be warned that Edge is a dependency for Windows features, and removing it may cause system instability or remove access to some features, requiring a confirmation before proceeding with the uninstall

I agree with @Trenly on this.

lackovic avatar Dec 10 '22 10:12 lackovic

I agree with @Trenly.

I've changed my stance since I originally posted the issue. The user must have as much control over their device as possible.

I propose an updated and better implementation: If the user tries to uninstall Edge, warn them that Edge is a dependency and uninstalling it might cause system issues. Allow them to override the warning and proceed with uninstallation.

pratyakshm avatar Dec 15 '22 19:12 pratyakshm

EDGE DEV >>>>>>>>>>>>>>>> EDGE

crazy that we need two browsers just cause it's the default APP!

luckybear97 avatar Mar 29 '23 04:03 luckybear97

Despite setting Firefox as my default browser, Microsoft Edge still opens when I press <F1> on my desktop. To try and fix this issue, I have decided to remove Microsoft Edge. If I need to reinstall it, I can still use the command winget install microsoft.edge. (So I think it should be safe?) Unfortunately, I am not able to remove it via winget uninstall microsoft.edge.

cpprust avatar Mar 31 '23 15:03 cpprust

Despite setting Firefox as my default browser, Microsoft Edge still opens when I press <F1> on my desktop. To try and fix this issue, I have decided to remove Microsoft Edge. If I need to reinstall it, I can still use the command winget install microsoft.edge. (So I think it should be safe?) Unfortunately, I am not able to remove it via winget uninstall microsoft.edge.

@cpprust does it throw any error if you try to run:

winget uninstall Microsoft.Edge

?

pratyakshm avatar Apr 02 '23 19:04 pratyakshm

Despite setting Firefox as my default browser, Microsoft Edge still opens when I press on my desktop. To try and fix this issue, I have decided to remove Microsoft Edge. If I need to reinstall it, I can still use the command winget install microsoft.edge. (So I think it should be safe?) Unfortunately, I am not able to remove it via winget uninstall microsoft.edge.

@cpprust does it throw any error if you try to run:

winget uninstall Microsoft.Edge

?

Don't work, they patched it. Technically you still can remove the files manually, but yeah, I don't want to take risk

luckybear97 avatar Apr 02 '23 21:04 luckybear97

@pratyakshm

> winget remove microsoft.edge
Found Microsoft Edge [Microsoft.Edge]
Starting package uninstall...
Uninstall failed with exit code: 93

cpprust avatar Apr 02 '23 23:04 cpprust

Interesting.

@denelon Can you confirm if WinGet, by behavior, blocks Edge Stable uninstallation?

pratyakshm avatar Apr 03 '23 06:04 pratyakshm

WinGet isn't involved in blocking any packages from removal. It's just calling the default "uninstall" step reported in the registry associated with Windows Apps & Features. I know there was a bug related to permissions for some of the MSIX based preinstalled packages. We've made a fix for that, but it isn't out in a stable release yet.

denelon avatar Apr 03 '23 15:04 denelon

Understood. This is on Windows client side then.

Thanks for the information!

pratyakshm avatar Apr 05 '23 19:04 pratyakshm

Interesting.

@denelon Can you confirm if WinGet, by behavior, blocks Edge Stable uninstallation?

I just uninstalled Edge Stable earlier today, found with issue while trying to figure out what error 93 was.

Taky0nDon avatar Sep 26 '23 04:09 Taky0nDon

winget uninstall Microsoft.EdgeWebView2Runtime Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Starting package uninstall... Uninstall failed with exit code: 93

winget uninstall Microsoft.Edge Found Microsoft Edge [Microsoft.Edge] Starting package uninstall... Uninstall failed with exit code: 93

image

3xploiton3 avatar Nov 24 '23 23:11 3xploiton3

I would propose that in this specific case, the user be warned that Edge is a dependency for Windows features, and removing it may cause system instability or remove access to some features, requiring a confirmation before proceeding with the uninstall

@Trenly in light of the changes in Windows to comply with the Digital Markets Act in the European Economic Area where Microsoft states that they have added the ability to uninstall Microsoft Edge, in the EEA, how is the uninstallation of Edge with winget going to look like? Will it be allowed only in Europe and others will continue to see the error message?

WinGet isn't involved in blocking any packages from removal. It's just calling the default "uninstall" step reported in the registry associated with Windows Apps & Features. I know there was a bug related to permissions for some of the MSIX based preinstalled packages. We've made a fix for that, but it isn't out in a stable release yet.

@denelon has the fix been released? I am still seeing the unhelpful message Uninstall failed with exit code: 93:

> winget uninstall Microsoft.Edge
Found Microsoft Edge [Microsoft.Edge]
Starting package uninstall...
Uninstall failed with exit code: 93

lackovic avatar Nov 26 '23 14:11 lackovic

Googling Uninstall failed with exit code: 93 brought me here. guess why.

its crap like this that makes me wish linux was better for a daily driver for me. :(

Kazlehoff avatar Jan 31 '24 23:01 Kazlehoff

Yet another Microsoft application making Microsoft winget a pain to use.

I'm using this for now to ignore it.

winget pin add Microsoft.EdgeWebView2Runtime

metamec avatar Mar 23 '24 17:03 metamec

I'm not going to lie... former Microsoft employee here, and I got here because I was trying to uninstall Microsoft.Edge and wanted to know what error 93 was ;)

(That said, I already had a suspicion that uninstalling Microsoft.Edge would break Windows but hoped beyond hope that Edgium, WebPlat, WinINet, WinHTTP, and friends finally had enough separation from the rest of Shell/NT after all these years.)

For future readers who find this thread, trust me, you do not want to uninstall Microsoft.Edge or the WebView Runtime, even though that's what I was trying to do. (Frankly as someone who also worked on AAD(EntraId?TFS?VSO?VSTS?ADO?AzureBoard?)/OneAuth at one point, I have no idea why I thought it'd be a good idea to try to uninstall the webivew lolol.)

Forget about warnings or configurability, I think period, Microsoft Edge should not be uninstallable.

Root Cause

Why is that? Does Microsoft hate you? Are we the Evil Empire ™? Maybe so re: the latter, definitely not re: the former (I think most of the folks I worked with did genuinely love our users). No, rather, you can thank your local congressperson and Department of Justice official for their brilliant performance in United States of America v. Microsoft Corporation, 253 F.3d 34 regarding the "bundling" of Internet Explorer with Windows, and the public/private API hell that emerged from it. You can choose to believe however that everyone at Microsoft is Bad At Building Operating Systems, as a proud former Windows eng I'm not even sure I'd argue with you on that, but I'd certainly challenge you to find a counterpoint of someone who is "good at building operating systems" (Terry Davis perhaps, certainly nobody at Apple nor Linux Corporation).

jimmy-zhening-luo avatar Aug 14 '24 04:08 jimmy-zhening-luo

I think period, Microsoft Edge should not be uninstallable.

As per my earlier message, Microsoft stated this year in February "for compliance with the Digital Markets Act (DMA) [...] we’ve added the ability to uninstall Microsoft Edge, in the EEA".

lackovic avatar Aug 15 '24 18:08 lackovic