I have uninstalled Microsoft Edge WebView2 multiple times and my computer works fine while its gone. Sometimes it takes a few weeks to come back, sometimes 24hrs. It's basically malware as I have no way to control installation.
I've read some threads on blocking it, specifically this GitHub thread, but I wanted to start an SO post and see if anybody had better solutions.
https://github.com/MicrosoftEdge/WebView2Feedback/issues/1223
My one thought was to leave it installed, so MS can stop forcing installation without my consent, but block it from "starting" or "being used"? Or, just simply block installation.
I added this to my build script:
@ECHO OFF
::"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\109.0.1518.78\Installer\"
cd "C:\Program Files (x86)\Microsoft\EdgeWebView\Application\1*\Installer\"
setup.exe --uninstall --msedgewebview --system-level --verbose-logging --force-uninstall
Looks like there is one way, but requires 365 Admin Role which I don't have. I am however an Admin on my Windows 10 terminal. Therefor this is untested..
Navigate to Microsoft 365 Apps admin center. https://config.office.com/
Go to Device Configuration > Device Customization > Modern Apps Settings.
Locate and hit Microsoft Edge WebView2.
Uncheck the box “Enable automatic installation of WebView2 Runtime”.