Skip to content

UWP or Assigned Access (kiosk mode) support? #31

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

Open
luke opened this issue Jul 16, 2019 · 18 comments
Open

UWP or Assigned Access (kiosk mode) support? #31

luke opened this issue Jul 16, 2019 · 18 comments
Assignees
Labels
feature request feature request tracked We are tracking this work internally.

Comments

@luke
Copy link

luke commented Jul 16, 2019

Happy to see WebView2 progress.

We have a digital signage app and would love to be able to run WebView2 in Asssigned Access mode as a Kiosk app. Do you know it that will work currently?

We ran into issues trying to get our current Electron based app running in Assigned Access as it seems its only possible to run UWP apps.

electron-userland/electron-windows-store#54

https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/17450752-assigned-access-not-working-with-electron

If not currently possible to run in Assigned Access for the same reason as Electron do you have plans to allow for UWP build?

AB#25566555

@liminzhu
Copy link
Member

liminzhu commented Jul 16, 2019

@luke thanks for submitting the issue! Assuming only UWP can run in Assigned Access mode, the win32 WebView2 wouldn't work there. However, we're also working with the XAML team to expose a UWP control on top of our win32 one.

@phraemer
Copy link

@liminzhu do the XAML team have a public issue tracker for the UWP component?
Our UWP product relies on WebView we would love to test previews and give feedback.

@adambarlow
Copy link

@phraemer, we are still working out the details of the Webview 2.0 for WinUI. We will be releasing a proposal and are excited to get feedback on it when it is posted.

We are targeting the Webview 2 for xaml to be released in the same timeframe as our WinUI 3.0 release.

@phraemer
Copy link

phraemer commented Aug 1, 2019

@adambarlow great news. We'll definitely be looking forward to that.

@verelpode
Copy link

Here is a "Me too!" from us. Yes please do support the UWP kiosk mode, but also the other kiosk modes, for both UWP and WPF apps:

  • UWP apps: The kiosk / assigned access mode feature that is configured via Start menu > Settings > Accounts.
  • WPF and WinForms apps: The "Client-EmbeddedShellLauncher" feature in Windows.
  • WPF and WinForms apps: The registry key Software\Microsoft\Windows NT\CurrentVersion\Winlogon with Shell value configured, in order to launch a different .exe instead of explorer.exe.

Although it might seem like these kiosk modes will be automatically supported without any special effort, surprisingly problems occur when Windows Explorer ("explorer.exe") is not running. For comparison, the current version of WebView-1-for-WPF (Microsoft.Toolkit.Wpf.UI.Controls.WebView) immediately crashes the whole app whenever explorer.exe is not running. UWP WebView (Windows.UI.Xaml.Controls.WebView) initially succeeds but then fails when you try to close/exit the app, if the WebView is running with the separate-process option (WebViewExecutionMode.SeparateProcess).

I also hope that when WebView2 is used in a separate-process mode, the web process will be launched in the same desktop (HDESK) as the app that uses WebView2, in order to make WebView2 compatible with apps/processes running in desktops other than the default desktop (another kiosk mode issue). WebView 1 has a bug where it always launches the separate process in the default desktop.

@liminzhu
Copy link
Member

Thanks for the input! Will definitely look into those.

For the process model, we have a short summary at https://docs.microsoft.com/en-us/microsoft-edge/hosting/webview2/reference/iwebview2webview#process-model.

@verelpode
Copy link

@liminzhu

Assuming only UWP can run in Assigned Access mode,

Today I realized that Assigned Access mode possibly supports all Windows apps but only if the apps are packaged with MSIX. The "What is MSIX?" webpage says that MSIX now supports all Windows apps (UWP, WPF, WinForms, Win32). But I've not yet tested Assigned Access mode with a non-UWP app in MSIX package.

More info:

A correction to my previous message: I said "Client-EmbeddedShellLauncher" and the Winlogon registry key work with WPF and WinForms, but I should have said: WPF, WinForms, and Win32 apps but not UWP apps.

@Cirnohalo
Copy link

@verelpode
I've tried to convert Win32 to MSIX, but that not support Assigned Access mode,

@verelpode
Copy link

@Cirnohalo
OK. I haven't tested that particular scenario myself, but according to your test results, Assigned Access mode seems to only support modern apps (UWP) regardless of MSIX, thus if you want to use Assigned Access mode, then you'll have to upgrade your app to modern UWP, but this is a problem currently because WebView2 is based on Google Chromium, and Google decided to write Chromium using the old obsolete Win16 system (1980's) that was updated and renamed to Win32 in the year 1993 (26 years ago).

Google's legacy codebase (decades out-of-date) surely causes a lot of extra work and difficulties for Microsoft staff members, and delays in WebView2, therefore we'll have to be patient, but I'm sure that Microsoft will eventually succeed in releasing WebView2 for modern UWP apps, despite the big challenges caused by Google's antique programming style.

It's just frustrating, and a pity, that the circumstances surrounding Google mean that Microsoft cannot write WebView2 in a modern manner. So when we eventually receive WebView2 for UWP, what we receive is actually a combination of obsolete tech from 1993 mixed with modern tech from 2019, hence delays and difficulties and extra costs and bug reports, but nevertheless the Microsoft staff will surely rise to the challenge and succeed with WebView2, despite the difficulties of a convoluted plan, although they might be very tired by the end of it 😄

@steipete
Copy link

Hi! Do we have any news regarding an UWP WebView2 preview?

We're planning our year roadmap and having a rough (at least target quarter) for when an alpha of UWP WebView2 is available would greatly help our planning.

@liminzhu
Copy link
Member

Re @steipete - @adambarlow can comment on the timeline. Also this is a good issue to follow in terms of UWP/WInUI WebView - microsoft/microsoft-ui-xaml#1658.

@adambarlow
Copy link

@steipete you can plan on a preview in the first half of this year, to give a conservative timeline. Stay tuned for more info on a more precise date, as we are working through that currently.

@liminzhu liminzhu reopened this Jan 17, 2020
@liminzhu
Copy link
Member

Leave this open as we'd want to look at Kiosk mode a bit closer. Saw the explainer for Edge Kiosk mode published yesterday. This would be the starting point of our research.

https://docs.microsoft.com/en-us/DeployEdge/microsoft-edge-kiosk-mode

@champnic
Copy link
Member

champnic commented Aug 15, 2020

AB#25566555

@champnic champnic removed the started label Jul 26, 2021
@champnic champnic added feature request feature request and removed question labels Dec 2, 2021
@langxiong
Copy link

@adambarlow @champnic Does kiosk mode support in UWP with webview2 prerelease(1.0.1083) ?

We plan to replace our app with webview2 version in UWP. But failed to launch it in kiosk mode.
kiosk mode error 0x80073cfb

@champnic
Copy link
Member

champnic commented Jan 5, 2022

Hey @langxiong - We don't currently have kiosk mode support yet for UWP.

@langxiong
Copy link

@champnic Please raise the priority of supporting kiosk mode feature in webview2.
We cannot understand why the edge browser works well but the webview2 control does not work.
I see that this issue was created on July 16, 2019. No progress for nearly 3 years.
If this feature will never be supported, we can end our webview2 research as soon as possible.

@champnic
Copy link
Member

champnic commented Jan 7, 2022

I should amend my previous statement. I actually don't know if this is currently working or not. The original issue was opened as a question rather than a statement that it doesn't work, because of the lack of UWP support. We only recently added a preview of UWP support, so it should be possible to test this now. If you want, you can try your scenario with the demo WinUI 2/UWP WebView2 app here:
https://github.com/MicrosoftEdge/WebView2Samples/tree/master/SampleApps/webview2_sample_uwp

@champnic champnic added the tracked We are tracking this work internally. label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests