I got to know about the WebView2 while testing ConfigMgr Technical Preview 2010 new features. Software Center can now use the Microsoft Edge WebView2 browser control. Installing WebView2 browser control provides improved security and user experience.
What is Microsoft Edge WebView2 ?
The WebView2 control uses Microsoft Edge (Chromium) as the rendering engine to display the web content in native applications.
With WebView2, you may either embed web code in your native application or build the entire native application within a single WebView. To get started with Webview2 read the introduction to Microsoft Edge WebView2 documentation.
Download Edge WebView2 Control
So let’s Download the WebView2 Runtime for Microsoft Edge. When you go to the WebView2 download page, you get three download options.
Download Evergreen Bootstrapper
The Evergreen Bootstrapper is a tiny installer that downloads the Evergreen Runtime matching device architecture and installs it locally. The installer is of size 1.69MB approx. There is also a link that allows you to download the Bootstrapper.
Download WebView2 Evergreen Standalone Installer
A complete installer that can install the Evergreen Runtime in offline environment. The separate installer is available for x86/x64/ARM64 devices.
Download WebView2 Fixed Version
Select and package a specific version of the WebView2 Runtime with your application. I am going to download x64 version since I have got only 64-bit devices in my setup.
Create Microsoft Edge WebView2 ConfigMgr Application
Launch the Configuration Manager console. Go to Software Library\Application Management. Right click Applications and create a new Application.
The installer that we have is an executable file. So select Manually specify the application information. Click Next.
Specify the application details and click Next.
Add a new deployment type. This launches Create Deployment Type wizard. On the General window, click Manually specify the deployment type information. Click Next.
On the Content page, specify the content location. Next, specify the WebView2 installation program.
MicrosoftEdgeWebView2RuntimeInstallerX64.exe /silent /install
In this step add a new detection method. We will use the registry to detect the presence on this application on a computer.
- Setting Type – Registry
- Hive – HKEY_LOCAL_MACHINE
- Key – SOFTWARE\WOW6432Node\AdventNet\DesktopCentral\DCAgent\Inventory\System\Software\Uninstall\Microsoft EdgeWebView
- Value – SoftwareVersion
- Data Type – Version
- Operator – Greater than or equal to
- Value – 87.0.664.60
Click OK and then click Next.
Specify the user experience settings for this application deployment. Click Next.
This is an optional step. However I am going to define a OS requirement here. The application installs only if detects Windows 10 64Bit OS. Click Next and complete the remaining steps.
Finally close the create application wizard.
Deploy Microsoft Edge WebView2 Using ConfigMgr
Now that you have packaged Microsoft Edge WebView2 app, deploy it to your test device collection. Ensure you have at least few machines within that collection to test the deployment.
On a Windows 10 machine, I open the Software Center and install the Microsoft Edge WebView2 application.
The install command works fine and as a result I did not encounter any issue during installation.
Prepared working directory: C:\Windows\ccmcache\1 AppEnforce 12/16/2020 8:19:51 PM 3740 (0x0E9C) Prepared command line: "C:\Windows\ccmcache\1\MicrosoftEdgeWebView2RuntimeInstallerX64.exe" /silent /install AppEnforce 12/16/2020 8:19:52 PM 3740 (0x0E9C) Executing Command line: "C:\Windows\ccmcache\1\MicrosoftEdgeWebView2RuntimeInstallerX64.exe" /silent /install with user context AppEnforce 12/16/2020 8:19:52 PM 3740 (0x0E9C) Working directory C:\Windows\ccmcache\1 AppEnforce 12/16/2020 8:19:52 PM 3740 (0x0E9C) Post install behavior is BasedOnExitCode AppEnforce 12/16/2020 8:19:52 PM 3740 (0x0E9C) Waiting for process 2520 to finish. Timeout = 120 minutes. AppEnforce 12/16/2020 8:19:52 PM 3740 (0x0E9C) Process 2520 terminated with exitcode: 0 AppEnforce 12/16/2020 8:20:11 PM 3740 (0x0E9C) Looking for exit code 0 in exit codes table... AppEnforce 12/16/2020 8:20:11 PM 3740 (0x0E9C)