Windows 11 23H2 getting huge (Edge WebView2)

Pater

New Member
Hi All,

I've been using NTLite for a good while, in fact so long that my old forum login no longer works so I just created a new one :D

Okay, I was playing with some 23h2 images. I downloaded the encrypted .esd from Microsoft at first (official build); I also updated 22h2 to 23h2; and also created a 23h2 iso using UUPdump. I use sysprep to update images and did so for all three approaches above.

What I'm noticing is the swelling of the .wim/.esd size when compared to previous 22h2 updated builds. When I looked at the discrepancy between images, two things stuck out on the updated builds: the additional \Windows\System32\Microsoft-Edge-Webview folder (488mb) and the inclusion of "amd64_microsoft-edge-webview" in WinSxS (693mb).

This may have nothing to do with "23h2" itself, maybe Microsoft is placing Webview in WinSxS and that Microsoft-Edge-Webview folder in System32 in 22h2 as well when Webview is updated to latest version (probably: one of the latest WU updates), or something? I haven't tested updating 22h2 (without enablement package in other words) so it may not be pertinent to "23h2" as such. It just sucks that the image sizes are swelling so much. The odd thing is, the System32\Microsoft-Edge-Webview folder contains v116.x (not latest, hence it is smaller also). Same version for the one found in WinSxS. Together, they constitute 1gb of data.

Can we remove these? Has anyone tried? Why the change to include these in System32 and WinSxS? I tried to make one build with manual removal of these folders and the result was not a stable install. Any words on NTLite's approach to this? I've been trying to find any info from users on the web who might have noticed the current images swelling due to these Webview folders but oddly I can't find anything about it anywhere?!

Any info or comments are appreciated!
 
I was thinking maybe Webview is being more deeply integrated to have "a" version present (if not latest one) in Windows, so when you remove Webview (via NTLite or otherwise), those v116.x instances mentioned above would remain? I haven't tested this, but it seems Windows is becoming more and more dependent on Webview for its functions, perhaps explaining why it is being integrated more deeply into the OS. I'm just thinking out loud because I can't seem to find much information on this. Either way it appears we may be stuck with these additional instances of Webview. In the past, Edge installers were to be found in WinSxS also, an approach Microsoft abandoned at some point (to my relief).
 
There are many reports on how 23H2's default image size is causing problems. For example, even MCT's ESD version no longer fits on a standard DVD, and requires two split WIM's on a FAT32 USB drive.

Edge or WebView2 versions on the ISO are never intended to be the latest. It's understood that you will have network access, and Edge or WebView updaters will self-install the latest builds. But there is always one version present on the image, in case you don't have network access or need a starter version to begin deploying Edge/WebView-based apps.

The real question is the disk space actually "doubled"? Normally the real install files reside in the WinSxS component folders, and Windows creates System32 hard links to them. The expected disk space is ISO version components + updated version components, before any DISM ResetBase cleanup is performed. Have you tried a post-update cleanup?
 
I made 10s of updated images of Win11 Pro this year, and the sizes never veered more than about 50mb apart between images.

The last couple of builds, the size increase is around 660mb (which falls in line with the size of the packed new Webview instances in System32 and WinSxS (how exactly the hard-link situation is here, I couldn't say).

This is a side-by-side view of a September wim (unfortunately I deleted an early October .wim which was the same size) and my build from yesterday (I have one from Nov 4 which is similarly large):

sshot-3.png

As you can see, it is the System32 and WinSxS folders that show up as being significantly larger.

Following is a side-by-side of yesterday's image, showing the inclusion of Webview in WinSxS (this has not occurred in all my previous images), as well as the System32 Webview folder. These are the only significant changes in folder/file sizes when comparing older images and the latest 23h2 images I made:

sshot-4.png

So System32 has the 512mb folder, WinSxS the 693mb folder. Again, these do not occur in previous Win11 updated images at all. So it is my conclusion this is what is swelling the current Win11 images 0.66gb in size when compared to previous updates Win11 images.

It would just seem to be something people would notice right away, but I can't find hardly any information about it.... Well, that's my findings so far as to why the images are quite a bit bigger. I found one article stating the 10% increase in size is due to "new features" but all areas of the .wim are roughly the same size so that simply can't be it.

Thanks for replying and looking into it!
 
MCT vs. UUP Q's and webView and version assumptions - sorry if my bell is ringing as it's sum up from many Q's answered already - my mistake if i'm wrong, but sound like W10User is back!?!
Feel free to share a preset.
 
MCT vs. UUP Q's and webView and version assumptions - sorry if my bell is ringing as it's sum up from many Q's answered already - my mistake if i'm wrong, but sound like W10User is back!?!
Feel free to share a preset.
Sorry, not me :) However, I helped nuhi a bit as a tester before his public release of NTLite, mainly regarding Win7.
 
MCT vs. UUP Q's and webView and version assumptions - sorry if my bell is ringing as it's sum up from many Q's answered already - my mistake if i'm wrong, but sound like W10User is back!?!
Feel free to share a preset.
You're mistaken. W10 User isn't this clever, nor concise in making any arguments. Credit to Pater for presenting a solid case.

I don't have time right now, but I might look into this more over the long weekend. We know MS admitted they screwed up something, which is why MCT was delayed about two weeks after the 23H2 ISO released. WebView2 offline installer is only 240 MB, so that folder view doesn't really make sense.
 
Oh, I forgot to answer your question about cleanup, garlin: Yes, I always run a cleanup script in my sysprep VMs before finalize:

Code:
@echo off
cls
echo.
echo **********************************************
echo ************ Cleaning for Sysprep ************
echo **********************************************

echo.
echo ~ Clean .NET Assemblies ~
taskkill /IM mscorsvw.exe /f
echo.
FOR /D %%f IN (C:\Windows\assembly\Nati*.*) do rd /q /s "%%f"
FOR /D %%f IN (C:\Windows\assembly\Nati*.*) do del /q /s /f "%%f"

echo.
echo ~ Clean winSxS ~
dism /online /cleanup-image /startcomponentcleanup /resetbase
echo.

echo.
echo ~ Clean SoftwareDistribution ~
net stop wuauserv
net stop bits
del /q /f "C:\Windows\SoftwareDistribution\*"
FOR /D %%f IN (C:\Windows\SoftwareDistribution\*) do rd /q /s "%%f"
FOR /D %%f IN (C:\Windows\SoftwareDistribution\*) do del /q /s /f "%%f"
echo.

echo ~ Clean temp folder ~
del /q /f "C:\Windows\Temp\*"
FOR /D %%f IN (C:\Windows\temp\*) do rd /q /s "%%f"
echo.

echo.
echo ~ Clean Windows Defender Scans ~
del /q /f "C:\ProgramData\Microsoft\Windows Defender\Scans\mpcache*"
echo.

echo.
echo ~ Clean Manifest Cache ~
net stop trustedinstaller
Takeown /f C:\Windows\WinSxS\ManifestCache\*
Icacls C:\Windows\WinSxS\ManifestCache\* /GRANT administrators:F
del /q /f "C:\Windows\WinSxS\ManifestCache\*.bin"
echo.

echo.
pause
 
Hi Pater,

thanks for the feedback, indeed Windows keeps getting bigger.
Great to see a veteran :)

That folder (\Windows\System32\Microsoft-Edge-Webview) is removable with the component "Microsoft Edge WebView".
Currently it also removes WebView in Program files (\Program Files (x86)\Microsoft\EdgeWebView\Application).
Will split the Legacy WebView just in case, so the Program Files one is not removed with it as well, even though it should be, more info below.

Btw there is a 3rd one as well (\Windows\SystemApps\Shared\WebView2SDK), currently named WebView2 in the tool, but that will be changed to - Core for clarity (not sure if it's actually just an SDK API of sorts, or a proxy for modern Apps). Keep this one.

Now the key, to update Edge Web View after removal, use the latest WebView2 update (Evergreen Standalone Installer).
Btw the 'Fixed' version, on the right, contains direct files in a CAB, but installer is simpler for manual use.
Make sure to elevate the installer manually, it won't prompt and it makes a difference.

One note though, unrelated to editing.
On a fully updated unedited Windows, but in a VM, I get this running the WebView2 update:
"Unknown Installer Error", and I see online other people have that issue.
However, running it on a previous month's VM, it works. So I guess that error is "already installed".

Also note that running the installer non-elevated, on a not yet updated OS, will produce a better looking "already existing" message, which is not true if one wants to update.
So a suggestion is to first try the installer to see if it works in your scenario, this is unrelated to NTLite.

Interestingly running it on my lite real machine it installed fine.
Important to note also is that it did not update the legacy one in Windows folder, only in Program Files.
So I think removal of both and updating after install should work just fine, unless some OS components are locked to the legacy one.
You can test that as is, remove only "Microsoft Edge WebView" component.

Let me know how it goes and if you have any comments to perfect this, I am thinking of adding WebView2 in the update list, even if just queues installer for post-install (installer would be outside of image, in $OEM$ folder).
 
Last edited:
Hi nuhi, great to see you too :)

Thanks for clearing some of these things up, that helps a lot. What I normally did was install the Evergreen installer inside the sysprep VM, but from what you're saying is that I should install Evergreen after the NTLite run, all depending of course on whether the OS prefers the legacy Webview or the one in Program Files for some of its functions.

I have not run into the Evergreen installer issue you mentioned, not on my last updated 23h2 builds either. I use VirtualBox for my sysprep images, not sure if that could matter, since you're saying it even installed fine on a real lite install. Being in Audit mode and thus acting from the built-in Admin account it may explain why I didn't run into the issue. I normally install all VC runtimes, DX9+, extra runtimes installer, Evergreen Webview in the sysprep VM and run NTLite on the resulting .wim, so I'll have to change that approach regarding the Webview installer.

The \Windows\SystemApps\Shared\WebView2SDK\ instance is only showing as 1.17mb in my Full updated wim, is that right? Meaning, this is on the sysprep capture before running NTLite on the wim.

As always, it'll be interesting to see what you come up with :D I'll let you know here of any findings I come across. Thank you!
 
Last edited:
Hi nuhi, great to see you too :)

Thanks for clearing some of these things up, that helps a lot. What I normally did was install the Evergreen installer inside the sysprep VM, but from what you're saying is that I should install Evergreen after the NTLite run, all depending of course on whether the OS prefers the legacy Webview or the one in Program Files for some of its functions.

I have not run into the Evergreen installer issue you mentioned, not on my last updated 23h2 builds either. I use VirtualBox for my sysprep images, not sure if that could matter, since you're saying it even installed fine on a real lite install. Being in Audit mode and thus acting from the built-in Admin account it may explain why I didn't run into the issue. I normally install all VC runtimes, DX9+, extra runtimes installer, Evergreen Webview in the sysprep VM and run NTLite on the resulting .wim, so I'll have to change that approach regarding the Webview installer.

The \Windows\SystemApps\Shared\WebView2SDK\ instance is only showing as 1.17mb in my Full updated wim, is that right? Meaning, this is on the sysprep capture before running NTLite on the wim.

As always, it'll be interesting to see what you come up with :D I'll let you know here of any findings I come across. Thank you!
Yes, remove "Microsoft Edge WebView" component first, you can even do it before deploying initially or live from C:\Windows while there.
Then install the Evergreen, it will update Edge\Runtimes as usual.

Yes, that SDK thing is small, not sure what it is, I would not remove it as it's small and has an API-ish outlook to it.

Let me know how it goes, I'll do the same. Will be removing the legacy runtimes from now forwards, next version will be able to remove Legacy only without removing Evergreen, so you'll be able to do it in whatever sequence.
 
That folder (\Windows\System32\Microsoft-Edge-Webview) is removable with the component "Microsoft Edge WebView".
Currently it also removes WebView in Program files (\Program Files (x86)\Microsoft\EdgeWebView\Application).
Will split the Legacy WebView just in case, so the Program Files one is not removed with it as well, even though it should be, more info below.

Are you sure the Program files one is removed with it?
they maybe hardlinked in install.wim, but the two locations don't seems hardlinked after deploy
Code:
fsutil hardlink list C:\Windows\System32\Microsoft-Edge-WebView\msedge.dll
 
Are you sure the Program files one is removed with it?
they maybe hardlinked in install.wim, but the two locations don't seems hardlinked after deploy
Code:
fsutil hardlink list C:\Windows\System32\Microsoft-Edge-WebView\msedge.dll
The current "Microsoft Edge WebView" component removes both, the Program Files (from the installer) WebView, and the old non-updateable one in System32.
They are not connected by themselves, true, the tool grouped them as someone removing WebView would want them both gone.
Now that we noticed an obsolete one even on updated systems, splitting has more sense.
I would still advise removing both on images, and updating to latest during the post-setup tasks.
Split legacy removal makes sense only after install if already updated.
 
I found one custom ISO release that had Edge WebView updated to the latest version (119), but LCU's never updated it for me...

Edge and Edge WebView took up more space than most other components combined. I was incredibly surprised when NTLite removed it, rebased the image without corrupting component store, and only slightly corrupting file integrity (restorable with SFC Scan).
 
That probably means at least when updating the OS base version Microsoft updates the built-in WebView.
But with the first cumulative update (when Canary becomes a Release), probably will diverge again.
I hope one day they merge them, or remove the builtin one.
Unless they don't trust the quick update cadence, and want the system apps to have something to fallback to, otherwise don't see the reasoning behind this bloat.

NTLite Beta with this split uploaded.
 
Based on my personal experiences on how things happen in MS, the release teams didn't pay attention to synchronizing WebView2 for the milestone builds. The consequences are a black eye for the Windows team in terms of ISO/ESD size.

If someone really cared, they would release 23H2v1 early next year as a do-over. Based on the fact that 2024 is when the final BlackLotus mitigation steps will be mandatory in the OS, v1 or v2 is expected any way.
 
That would be appreciated.
For now including Webview2 folder in \Program Files (x86)\Microsoft (EDGE) is about 2 gigs + another 0,5 gig with preinstalled Webview in \Windows\System32\Microsoft-Edge-WebView is complete insane.
Hope my IT vendor have an elastic price on the size for my next SSD/ HD matching MS development of Windows.
 
https://forums.mydigitallife.net/posts/1816821/
Code:
DISM commands, only for offline image
/Remove-Edge - Removes All Edge from image.
/Remove-EdgeBrowser - Removes Edge Browser from image.
/Remove-EdgeWebView - Removes Edge WebView from image.
i actually knew about first command since W11 21H2 was released
the other two are probably added with W11 22H2

p.s. those only remove the outbox Edge "\Program Files (x86)\Microsoft\"
 
Back
Top