Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to define an Edge RunTime setup project prerequisite step which only installs the runtime once in each scenario #2107

Closed
WildlifeSOS opened this issue Jan 25, 2022 · 8 comments
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@WildlifeSOS
Copy link

WildlifeSOS commented Jan 25, 2022

Using https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/WV2DeploymentVSInstallerSample

As far I understand it the recommended approach is to chain-install the Evergreen WebView2 Runtime

The process writes a single registry key to indicate it has been successfully installed

The actual registry key written depends on whether the installation executes in an elevated process or command prompt or not (and whether you are running on 64-bit or 32-bit windows) ... so that's 4 locations.

The example product.xml only checks the 64-bit windows elevated process registry location; if that doesn't apply to you (as is the case for me) then every version of my application that I create going forward will start the Evergreen WebView2 Runtime installation which isn't what I want to happen.

How can I prevent that?

I have tried using multiple InstallChecks and multiple variants on the HKCU registry key

I couldn't get it to work

Do multiple InstallChecks work?

What's the correct format for a HKCU registry key?

AB#37954769

@WildlifeSOS
Copy link
Author

I don't need an answer to this anymore as we've decided to add installing the runtime as a prerequisite step which customers need to do themselves

@WildlifeSOS
Copy link
Author

WildlifeSOS commented Jan 27, 2022

Windows update is now starting to install Microsoft Edge WebView2 Runtime and so this is becoming a minor issue.
I have changed my installed Winforms applications to call CoreWebView2Environment.GetAvailableBrowserVersionString on startup; if that returns a null or empty string then I show a MsgBox saying that the runtime needs to be installed and end the application.

@champnic champnic added bug Something isn't working tracked We are tracking this work internally. and removed question labels Jan 28, 2022
@champnic
Copy link
Member

Glad you have a workaround for now @JimWard2018. I'm opening this as a bug on our backlog to track fixing the sample for the updated installer behavior. Thanks!

@stefnotch
Copy link

Windows update is now starting to install Microsoft Edge WebView2 Runtime and so this is becoming a minor issue.

This makes me curious, does it install the Microsoft Edge WebView2 Runtime on Windows 10 or Windows 11?
If it actually does that on typical Windows 10 machines, then would that mean that #348 is being addressed?

@WildlifeSOS
Copy link
Author

@stefnotch all my development was done on windows 10 enterprise version 21H2

@champnic
Copy link
Member

@stefnotch Currently, WebView2 is inbox with Windows 11, and some big apps (like Office) are installing WebView2 on Windows 10 machines. Windows Update shouldn't be installing WebView2 itself on Windows 10 machines. However, we are addressing #348, and hope to have some coverage on Windows 10 machines in the coming months. Thanks!

@stefnotch
Copy link

@champnic Thanks for the information. I most certainly am looking forward to Webview2 being available on more machines, it's such a convenient alternative to shipping massive Electron/Chromnium binaries.

@DavidShoe
Copy link
Contributor

There is an update to the platform bootstrapper information checked in, it will go onto the public samples repository with the next round of updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

4 participants