I am looking for a way to detect if WebView2 runtime is installed on the clients machines so that i can display using the old ie browser instead if they don't have it installed. I am using VB.NET.
Thanks
You can refer to this doc about how to check if the WebView2 Runtime is already installed. To verify, complete one of the following actions:
Inspect if the pv
(REG_SZ
) regkey exists and is not null or empty. Find pv (REG_SZ
) at the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}
VB.NET code to check pv
regkey:
Dim readValue = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}", "pv", Nothing)
If readValue Is Nothing Then
'Key doesn't exist
Else
'Key existed, check value
End If
Run GetAvailableCoreWebView2BrowserVersionString
and ensure the versionInfo
is NULL
.
It uses C++ in the doc. For VB.NET, the corresponding method is GetAvailableBrowserVersionString(String)
. You can refer to the doc about how to use it in VB.NET.