MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WebView2Install /silent /install - no easy way to wait, crashing consuming applications
@champnic is already working on this.
Since Jun 4, 2021.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
The WebView2 Installers (Bootstrapper+Standalone) exit too early, when run with /silent /install from another installer. There is no easy way for a parent installer to correctly wait until the installation finishes. Our Installer starts the WebView2 Consuming Application (Outlook.exe) immediately after the installation, causing Outlook.exe to have Access Violations and this even corrupts WebView2/Edge Data directories sometimes. We must support Windows 7 to Windows 10, so we expect that we will always need to include WebView2 in our installer. We do not want to deploy fixed versions along with our application since that would be too difficult/inappropriate.
If we manually install WebView2 to ensure the installation finishes before the Consuming Application (Outlook.exe) starts, then everything works fine.
Version
Public Installer Versions avaiable as of 01-June-2021 from
https://developer.microsoft.com/de-de/microsoft-edge/webview2/
Installers that we are interested in:
Bootstrapper (prefered)
Standalone Installer
Repro Steps
- start a VM/physical Windows 10 machine without any webview2 components installed
- Download any mentioned installer from https://developer.microsoft.com/de-de/microsoft-edge/webview2/
- start a cmd.exe, (admin or not -> same behaviour)
- run the installer, XXX.exe /silent /install
- check with process explorer / task manager to see when the installation finishes
- check when the installer exits in cmd.exe
Expected behaviour
- the main setup.exe exits AFTER the installation is complete
- so the parent process can simply wait for main setup.exe to complete
Actual behaviour
- the main setup.exe exits IMMEDIATELY, leaving no chance for the caller to wait for the finished webview2 installation
- the actual installation continues in background and takes some time to finish
- there seem to be multiple subprocesses having different names, depending on type of installer and platform
In our scenario this even means:
- Our installer does not wait until WebView2 installation is finished and starts consuming processes too early, while WebView2 installation is still running.
- This sometimes crashes Outlook (our Consumer) with Access Violation and may leave the WebView2 data dir "corrupted", because it has been created by a "partial installation" of WebView2.
Additional context
Our Scenario:
- We use WebView2 from a COM Addin in Outlook, using C# and netoffice
- We are hosting an Outlook Web Addin inside this WebView2 to work via COM with a Desktop Outlook. (So we can use the same addin for web and Desktop)
- Beside this problem everything works like a charm (almost ;)
- We have created an installer which runs WebView2 setup (currently the evergreen bootstrapper)
- We do not want to have the fixed version installer, really not.
- There is no /wait parameter in the documentation resp. I did not find any hint how to solve this problem.
- I would expected the installer in general to wait or at least to have a documentented /wait parameter
- Waiting for process tree cannot be the solution, its also nearly impossible in plain C#, needing to either use PInvoke to call the Win32 API or to use tricks like WMI or PerformanceCounter to find parent/child relations.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.