How to run a C# program in kiosk mode? [closed]

2019-01-18 17:37发布

问题:

I have a c# and WPF program which i want to install on a windows tablet, i want my program to be the only program running on the tablet, it should start running automatically right when the user will turn on the tablet. Any solution?

回答1:

Never use windows original kiosk mode - it useless. Use shell replacing.

To configure Windows kiosk mode you need next steps:

  • 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 this 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 don't set autologin and windows will show 2 users: admin and kiosk user with this your software.