Offline Installer: Webview2
Technical White Paper: Strategies for Offline Deployment of the Microsoft Edge WebView2 Runtime Date: October 26, 2023 Subject: WebView2 Runtime Distribution and Offline Installation Architectures Audience: Software Architects, DevOps Engineers, System Administrators
Abstract As the Microsoft Edge WebView2 control becomes the standard for embedding web technologies in native Windows applications (WinUI 2/3, Win32, .NET), managing its runtime dependencies becomes a critical deployment concern. While the "Evergreen" distribution model offers automatic updates and reduced application size, it relies on an active internet connection. This paper explores the architectural challenges of deploying WebView2 applications in disconnected or restricted environments. It contrasts the Evergreen and Fixed Version distribution modes, details the technical implementation of the WebView2 bootstrapper and standalone installer, and provides a step-by-step guide for integrating the runtime into offline installation pipelines.
1. Introduction The WebView2 control utilizes the Microsoft Edge (Chromium) browser engine to render web content within native apps. Unlike its predecessor (MSHTML/Trident), WebView2 is not built into the operating system by default on all supported Windows versions. Consequently, the runtime must be present on the target machine for the host application to launch successfully. For organizations operating in secure networks, air-gapped environments, or strict enterprise configurations where the Microsoft Update service is disabled, the default "Evergreen" online installation fails. This necessitates an "Offline Installer" strategy where the runtime is packaged and deployed alongside the application. 2. Distribution Modes Overview To understand offline installation, one must distinguish between the two primary distribution strategies provided by Microsoft. 2.1 Evergreen Standalone (Online) In this mode, the application assumes the WebView2 Runtime is present. If missing, a small "bootstrapper" executable downloads and installs the latest runtime from Microsoft servers.
Pros: Small application footprint; users always have the latest security patches. Cons: Fails without internet connectivity; enterprise firewall rules may block the download. webview2 offline installer
2.2 Fixed Version (Offline) This mode allows developers to package a specific version of the WebView2 Runtime binaries directly within their application.
Pros: Total control over the runtime version; no internet required post-packaging; guaranteed consistency. Cons: Significantly larger application size (increasing binary size by several hundred megabytes); the developer assumes responsibility for security updates.
3. Implementation Strategies for Offline Deployment There are two primary methods for ensuring offline compatibility: executing the Standalone Installer during setup, or embedding the Fixed Version binaries. 3.1 Method A: The Standalone Installer (Chain Installation) This method is preferred for traditional MSI or EXE installers. The developer bundles the full WebView2 runtime installer with their application setup file. The Workflow: Technical White Paper: Strategies for Offline Deployment of
Acquisition: Download the "Evergreen Standalone Installer" from the official Microsoft WebView2 download page. (Do not confuse this with the Bootstrapper; the Standalone Installer contains the full payload). Packaging: Include MicrosoftEdgeWebView2RuntimeInstallerX64.exe (or X86/ARM64) in the installer resources. Execution: During the application installation process, execute the WebView2 installer silently.
Command-Line Arguments: The installer supports silent switches essential for automated deployment:
/silent : Suppresses all UI. /install : Explicitly triggers installation. It contrasts the Evergreen and Fixed Version distribution
Example PowerShell / Script Logic: # Check if WebView2 is already installed to avoid unnecessary overhead $regPath = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" if (-not (Test-Path $regPath)) { Start-Process -FilePath ".\MicrosoftEdgeWebView2RuntimeInstallerX64.exe" -ArgumentList "/silent /install" -Wait }
3.2 Method B: Fixed Version Deployment (Portability) This method is ideal for "portable" applications or scenarios where installing a system-wide MSI is prohibited by user permissions. The Workflow:











