2

I have a severe hate for Microsoft Edge WebView2. No other program has forced installation like this.

Occasionally, I install it manually via a downloaded package.

https://developer.microsoft.com/en-us/microsoft-edge/webview2/

All the links online talk about uninstalling via the following, but I noticed it only works when Microsoft installs it without my consent.

cd "C:\Program Files (x86)\Microsoft\EdgeWebView\Application\1*\Installer\"

setup.exe --uninstall --msedgewebview --system-level --verbose-logging --force-uninstall

When I install via the Packaged version, I have to uninstall via "Remove Apps/Programs" under settings UI.

How can I uninstall via CLI?

Note: This is similar to How to uninstall Microsoft Edge WebView2 but I'm specifically talking about the version installed offline and uninstalling via CLI.

Update:

MicrosoftEdgeWebView2RuntimeInstallerX64.exe /silent /uninstall

Has Error: enter image description here

Further Update:

  • This issue is compounded by the fact that when I install offline, MS will still update/install via setup.exe found in the normal "C:\Program Files (x86)\Microsoft\EdgeWebView\Application\1*\Installer\" location. If the installation is upgraded, I think I need to use the setup.exe.

I'm basically looking for a script that will do both, try and look/use setup.exe and look for offline installer. Ironically, it seems that the setup.exe is deleted after I uninstall.

I need to be able to basically install and uninstall at will because I'm getting CORs issues and different results based on install status. The trouble is I can't control installation/updates.

1 Answers1

2

When installing manually, it installs to %LocalAppData%.

I had to also remove the --system-level flag. Note: If I didn't remove this flag, I got no error, but it also didn't work.

Here is my batch script as it stands:

@ECHO OFF
cls

::MS Persistent Installation cd "C:\Program Files (x86)\Microsoft\EdgeWebView\Application\1*\Installer" setup.exe --uninstall --msedgewebview --system-level --verbose-logging --force-uninstall

::Manual/Offline Insallation ::NOTE: No "--system-level" cd "%LocalAppData%\Microsoft\EdgeWebView\Application\1*\Installer" setup.exe --uninstall --msedgewebview --verbose-logging --force-uninstall

pause