Skip to content
We’ve Run Into an Issue Download Edge WebView2

We’ve Run Into an Issue Download Edge WebView2

I’ve been running into this issue repeatedly for a few clients lately, usually showing up as Microsoft Teams or OneDrive throwing a vague “We’ve run into an issue” message and prompting the user to download Edge WebView2. After fixing it manually more times than I care to admit, I finally got annoyed with the repetitiveness and decided to automate the fix into a single batch script you can run with a double click.

In most cases, reinstalling Teams or OneDrive does nothing. That’s because the underlying problem usually isn’t the app itself.

 

What’s Actually Breaking

In my experience, this issue almost always comes down to a broken or partially corrupted Microsoft Edge WebView2 runtime. WebView2 is a shared system-level component that Microsoft uses to render UI inside apps like Teams and OneDrive. When it’s missing, corrupted, or stuck in a bad state, multiple apps can fail in similar and confusing ways.

 

Common causes I’ve seen include:

 

  • Interrupted or failed WebView2 updates

  • Corrupted installer files

  • Pathing issues where WebView2 exists on disk but apps can’t resolve it correctly

 

Because WebView2 is installed separately from Teams and OneDrive, reinstalling those apps usually leaves the broken runtime untouched.

 

Why This Is Annoying to Fix Manually

One of the more frustrating parts of this issue is that WebView2 installs itself into a versioned folder under its application directory. The folder name is a numeric version string, for example 144.0.3719.82, and that version changes constantly as updates roll out.

 

That means:

 

  • You can’t reliably hardcode the path

  • The registry is not always trustworthy when the runtime is partially broken

  • The installer you need is buried under a version-specific folder

 

This is exactly the kind of problem that’s easy to fix once, but painful to repeat across multiple machines.

 

What the Script Does

This script is designed to fix the “We’ve Run Into an Issue” / “Download Edge WebView2” error in a repeatable way.

 

At a high level, it does three things:

 

  1. Allows WebView2 to be repaired

    • It updates two registry values that control whether the Edge WebView2 runtime can be reinstalled or repaired.

    • In certain failure states, those flags prevent the installer from doing anything useful.

  2. Automatically finds the installed WebView2 version

    • Instead of relying on the registry or hardcoded paths, the script locates the active WebView2 version folder directly on disk.

    • It identifies the numeric version directory dynamically, so it works regardless of the installed version.

  3. Runs a proper system-level repair

    • It executes the correct setup.exe from the discovered version folder.

    • This forces a clean, system-level repair install of the WebView2 runtime.

 

The end result is a repaired WebView2 runtime without having to uninstall Edge, reinstall Teams, or manually hunt through folders.

 

Usage Notes

  • The script must be run as administrator.

  • It will close Edge and WebView2 processes to avoid file locks.

  • It returns an exit code of 0 when the repair completes successfully.

  • It’s designed to be portable, you can drop it onto an affected machine and run it directly.

 

I’ve tried to keep this as universal as possible so it can be used across different systems without modification. If you do run into edge cases or failures in your environment, let me know, but this approach has been reliable for me and has saved a lot of repetitive cleanup work.

 

 

@ECHO OFFSETLOCAL ENABLEEXTENSIONSsetlocal enabledelayedexpansionCOLOR 09TITLE JOSHFRIDEY.COM WEBVIEWW2 FIX:: --- Elevation Check ---:: Check if script is running as admin (no redirection)NET SESSIONIF %ERRORLEVEL% NEQ 0 (   ECHO Requesting administrative privileges...   PowerShell -Command "Start-Process '%~f0' -ArgumentList '/elevated' -Verb RunAs"   EXIT /B):: Check for elevation flagIF "%1"=="/elevated" SHIFTset "REGKEY=HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView"set "VALNAME=SystemComponent"set "VALNAME2=NoRemove"echo Setting %REGKEY% %VALNAME% to 0...reg add "%REGKEY%" /v "%VALNAME%" /t REG_DWORD /d 0 /fif errorlevel 1 ( echo Failed to set registry value %VALNAME%.)reg add "%REGKEY%" /v "%VALNAME2%" /t REG_DWORD /d 0 /fif errorlevel 1 ( echo Failed to set registry value %VALNAME2%.)REM --- Determine WebView2 folder version from disk ---set "APPROOT=C:\Program Files (x86)\Microsoft\EdgeWebView\Application"set "RAW="REM Find the only folder whose name contains only digits and dots, like 144.0.3719.82for /d %%D in ("%APPROOT%\*") do ( set "NAME=%%~nxD" set "TMP=!NAME!" REM Strip digits and dots for %%C in (0 1 2 3 4 5 6 7 8 9 .) do set "TMP=!TMP:%%C=!" REM If nothing remains, NAME was only digits and dots if "!TMP!"=="" (   set "RAW=!NAME!"   goto :FoundVersion )) :FoundVersionEcho Version %RAW% set "EXE=C:\Program Files (x86)\Microsoft\EdgeWebView\Application\!RAW!\Installer\setup.exe"echo Stopping WebView2 and Edge processes..taskkill /f /im msedgewebview2.exetaskkill /f /im msedge.exestart "" /wait "%EXE%" --msedgewebview --system-level --verbose-loggingset "EC=%ERRORLEVEL%"echo WebView2 reinstall exit code: %EC%ECHO === WEBVIEW2 FIX COMPLETE ===ECHO Press any key to exit...PAUSEEXIT
Scratch Contact Us

You can contact my best friend and food provider with this form. Suggestions, corrections, and questions are always welcome! Please also message me French fries...

Scratch