Our application use WebView2 and it must be keep running for a week or more. We are concerned that if an uninstall occurs due to a WebView2 update while our application is running, it will be terminated by the Restart Manager.
The PC using this application may not have joined the domain and cannot control or block updates by the GP or registry.
(We believe that if an update is performed and WebView2 uninstallation occurs, the application will be terminated by Restart Manager. GitHub - SessionEnding event is raised when WebView2 is uninstalled )
Is there a possibility that the WebView2 auto update will occur while there are processes using WebView2?
The WebView2 runtime has an updater that will run in the background and install updates when they are available. New versions are installed side by side with older versions. Older versions are only removed when no longer in use.
The WebView2 runtime updater works in the same way as the Edge browser updater. When a new version is available the updater will install the new version side by side with any existing versions that are currently in use. The old version will be deleted once its no longer in use. That is, apps with already created WebView2s will continue to use the older version. The CoreWebView2Environment.NewBrowserVersionAvailable event will be raised to tell apps using the old version to move to the new version. Once the apps using the old WebView2 version stop using the old WebView2 version, the older version will be deleted.
New WebView2 instances will be created using the newest available version even if there are other apps using the older version at the same time. One exception to this is if you create a new WebView2 instance that shares a user data folder with an already running WebView2 running with an older WebView2 runtime version. In that case the new WebView2 instance will connect to the already running older versioned WebView2 runtime environment.