MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
441 stars 52 forks source link

SCCM Task Sequence fails while installing Webview2 #3303

Open mmtechconsulting opened 1 year ago

mmtechconsulting commented 1 year ago

We are using SCCM to deploy machines to our users. Our task sequence has started failing intermittently on Webview2. I had a look at the webview2 installer logs at c:\windows\temp\ and i can see that there is already a "higher version of Edge installed." That is the error.

Now i have run a proc mon and i can see that Edge gets updated during the task sequence , as it pulls updates from the internet. Then when it reaches the Webview installer it fails.

Screenshot of the webview log : image

then i had a look at my task sequence logs and i can see :

image

Any ideas how to tackle that?

LiangTheDev commented 1 year ago

I have asked Edge installer team to comment and have not get response back yet.

But for the case where higher version is already installed, could we just treat that exit code as success. Or we really want to ensure a specific version is installed? Or, is it possible to detect whether WebView2 runtime is already installed and skip the installation. https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#detect-if-a-suitable-webview2-runtime-is-already-installed has details on how to check whether it is already installed.

andyzei commented 1 year ago

Hi @mmtechconsulting -- I'd recommend picking either WSUS or EdgeUpdate to drive WebView2 updating. If you use both at the same time, this is kind of expected. I would either not approve the updates and let EdgeUpdate take care of it (it's great, but doesn't work for certain scenarios, e.g. air gapped), or drive everything via WSUS.

If you want to disable EdgeUpdate's updating of WebView2 and let WSUS drive, set this policy to disabled:

https://learn.microsoft.com/en-us/deployedge/microsoft-edge-update-policies#microsoft-edge-webview

Note there are separate "UpdateDefault" policies for Browsers vs WebView2 -- make sure to set UpdateDefault for WebView2 -- you can grab the latest policy templates here: https://www.microsoft.com/en-us/edge/business/download.

Thanks,

Andy


mmtechconsulting commented 1 year ago

Hi Andy,

Thanks for that. All these are happening during OSD. So there is no group policies applying.

inspectastef commented 1 year ago

I have this issue currently and the only workaround is to update your package to the latest version of edgeview and update your DP's and then test again. It should work until another update is released.

MikhailCompo commented 6 months ago

Hi Andy,

Thanks for that. All these are happening during OSD. So there is no group policies applying.

Group policy DOES run for a Windows 10/11 task sequence.

For Windows 7 only, I believe that the task sequence engine used to stop the Group Policy service during task sequences, for obviously reasons. However, in Windows 10 the GPO service is a mandatory service which even an administrator cannot stop or restart and if the service crashes, the system is forcibly rebooted. Its like the RPC service, its critical infrastructure.

Feel free to test yourself.