简体   繁体   中英

Windows UWP Template 10 and Assigned Access/Kiosk Mode

I'm currently working on a Windows 10 UWP Kiosk Mode application to run on a tablet and after having just stumbled on the Template 10 project templates I'm wondering how you would go about making the necessary changes to the base Template 10 project to allow it to run in Assigned Access. I've found this page

https://msdn.microsoft.com/en-us/library/windows/hardware/mt633799(v=vs.85).aspx

as a resource and it seems to be very helpful but after looking through the Template 10 Hamburger project it seems to be laid out differently than a simple empty UWP project so the conversion isn't really straightforward. The immediate issue being that there is no OnLaunched function to override in App.xaml.cs. I'm sure there are other discrepancies.

I didn't work with Template10 but I worked with another MVVM Frameworks like Prism, Caliburn and MVVM Light toolkit for creating Kiosk Mode apps or Assigned Access.

In my experience the only issue I had is when I create a custom Service to inject in my VM with the simple container (IoC or ServiceLocator)

you will need to use some different approaches to debug your app like Debug Installed App Package or Debug Windows Universal Prelaunch

I recommend you to debug your app in a real device in Assigned Access mode using remote debugging because always in your app the app will launch fine but in the device would be different.

Please check this doc. https://msdn.microsoft.com/en-us/library/hh781607.aspx

I don't recommend to use windows internal kiosk mode - it almost useless and din't work as expected. After some experiments and few real kiosk projects I found best solution with full control.

Steps are next:

  • Create user for kiosk mode
  • Set next registry key for this user as path to your application:

Windows XP/7:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="C:\\full\\path\\to\\your\\application.exe>"

Windows 8 and later:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"Shell"="C:\\full\\path\\to\\your\\application.exe>"

Autologin for kiosk user:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon] 
"AutoAdminLogon"="1"
"ForceAutoLogon"="1"
"DefaultUserName"="kiosk"
"DefaultDomainName"="<place here pc hostname>"
"DefaultPassword"=""

[Option] If you need to disable Ctrl+Alt+Del, then use this registry key value ("") or you can place there own application:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe]
"Debugger"="\"\""

Create kiosk user with your application as shell and create/activate admin with password. With autologin to load as admin press shift when windows loading and before autologin or while logging out - windows will not autologin and show users list. Or, you can not set autologin and windows will show 2 users: admin and kiosk user with your software.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM