MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WebView2 setup fails to cleanup old version if previous directories are empty
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
The Edge WebView2 setup cleanup routine will fail to remove previous version directories in Program Files X86\Microsoft\EdgeWebView\Application if the previous version directories do not contain the file msedgewebview2.exe .
Example:
"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\95.0.1020.53\Installer\setup.exe" --msedgewebview --delete-old-versions --system-level --verbose-logging --on-logon
Because this occurs during logon by RunOnce wrapper, the login process will essentially hang with a black screen since the Explorer shell will not load until RunOnce has completed. Additionally, the msedge_installer.log will erroneously report that the file is in use even though it does not exist:
WARNING:delete_old_versions.cc(167)] Failed to delete old executable on C:\Program Files (x86)\Microsoft\EdgeWebView\Application\95.0.1020.30\msedgewebview2.exe: The system cannot find the file specified. (0x2)
WARNING:delete_old_versions.cc(267)] Failed to delete stray directory due to exe in use C:\Program Files (x86)\Microsoft\EdgeWebView\Application\95.0.1020.30: The system cannot find the file specified. (0x2)
VERBOSE1:setup_main.cc(660)] Failed to delete all old files from --delete-old-versions process. Will retry every five minutes.
This can be reproduced as easily as creating a blank directory in Program Files X86\Microsoft\EdgeWebView\Application that matches the version numbering scheme (e.g. 99.9.9999.99). Simply adding a blank file with the filename msedgewebview2.exe to the same directory then allows the setup process to complete successfully.
Adam
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with the provided setup.exe command and an empty version directory under C:\Program Files (x86)\Microsoft\EdgeWebView\Application. Inspect the cleanup behavior and msedge_installer.log output; done means empty old-version directories are removed without a false file-in-use error or a retry that blocks logon.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100