Detzection logic in Bundle.wxs seems wrong
To detect whether Webview2 is installed, WebView2Samples/SampleApps/WV2DeploymentWiXBurnBundleSample/Bundle.wxs uses
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Value="EBWebView" Variable="WVRTInstalled" Win64="no" />
According to https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution and my own experience, the value should however be "pv", not "EBWebView". i.e.
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Value="pv" Variable="WVRTInstalled" Win64="no" />
I've just hit this issue, it is the same for: https://github.com/MicrosoftEdge/WebView2Samples/blob/master/SampleApps/WV2DeploymentWiXCustomActionSample/Product.wxs
Nice catch! I've opened a bug on our backlog to get this fixed. Should be an easy one :)
According to this, https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment. There are different registry keys for 32 and 64 bit Windows.
According to this, https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment. There are different registry keys for 32 and 64 bit Windows.
That's not an issue. The attribute Win64="no" causes Wix to search the correct tree.
The documentation states that there are two registry keys to check: One under HKEY_LOCAL_MACHINE which I assume to be the one for all-users-installs, and one under HKEY_CURRENT_USER, which I assume to be the one for user-specific installs. In the end, the condition should be whether an install usable by the application is present. And that condition is also fulfilled by a user-specific install of WebView2 Runtime. Is it deliberate that the example does not check HKEY_CURRENT_USER but only HKEY_LOCAL_MACHINE?
Hey @exaiwitmx - No, it is not deliberate. The user-specific install support was added later and the example has not been updated yet. We have that discrepancy tracked in #2107. Thanks!
In neither of them (32/64/HKLM/HKCU) does the value EBWebView exist.
I discovered the example seems out of date, for me the key was at <RegistrySearch Id="WVRTInstalled" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\ClientState\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="EBWebView" Type="raw"/>