4

I need to create an application that will run full-screen on Windows 8 and which the user shouldn't be able to exit easily.

Since the application will be running on computers or tablets with only tactile input, I was going to create a chromeless and top-most WPF application, which could only be closed if a keyboard is connected.

The problem is that the app switching bar on the left and the charms bar on the right can still be opened without a keyboard and would allow users to exit the application. Can this be disabled from code? I can't seem to find a way.

The easy solution would be to run on another OS, but the machines will be running Windows 8 and there's not much I can do about that.

madd0
  • 9,053
  • 3
  • 35
  • 62
  • You may succeed in making the application close-resistant, but what if the process is killed or crashes ? There are many ways an application can be terminated, and you can control only some of them. More obvious way that comes to mind is CTRL+ALT+CANC -> task manager -> kill process – Alex Aug 06 '12 at 09:00
  • In my case, the user will not have access to a keyboard. I have a list of "hacky" alternatives, but I wanted to know if the more proper one, i.e. simply disabling the bars, is possible. Like, how will full-screen games work on W8? The bars can be annoying if the mouse happens to go into the corners of the screen… – madd0 Aug 06 '12 at 09:07
  • @Deanna that may be true for "mainstream" apps, but what about all the other times when you have an app of limited distribution that needs to behave in a particular way and that you want to run on Windows? Time to switch OSs? – madd0 Aug 06 '12 at 12:06
  • Oh, there's been as misunderstanding, I'm not creating a "Metro style app", it says it right there in the question, I'm doing WPF (added the tag too a second ago to avoid confusion ;) ). But the OS is permeating via the charms, app switching and closing gestures. I can remove the keyboard, but I can't remove the sides of the screen :) – madd0 Aug 06 '12 at 12:11
  • Ahh, OK, you could try creating a new desktop and runnign on that. – Deanna Aug 06 '12 at 12:22
  • Are you providing the hardware? If so, you can install [Windows Embedded](http://www.microsoft.com/windowsembedded/en-us/windows-embedded-8.aspx) on it instead of the desktop OS. That allows your app total control over the hardware. – Dour High Arch Sep 03 '14 at 21:21

7 Answers7

1

I have dug up a .TXT with some notes I found somewhere on the net some time ago, it might be helpful (worst case scenario, it doesn't apply to Windows 8 and doesn't work. Unfortunately I'm unable to cite a source for it, I don't really remember where it came from):

A “kiosk mode” has already existed since XP. Usually it's aimed at locking IE up in order to show some interactive webpage while not letting the user close it: it's called mandatory user profiles.

To set it up:

  1. Set up the account just the way you want. Set the group policy, set up the startup programs The user must be a standard user, not an admin. But then again, if an unauthorized person can get admin rights even though the computer is “frozen”, I think you got more serious problems.
  2. Login as admin and Computer Properties > Advanced > User Profiles Settings > (select that profile) > (copy it to whatever place) > set “permitted to use” to Everyone
  3. Go to that folder properties > Security > (change it so that Everyone can read and modify, but not write, make sure you apply to EVERYTHING inside)
  4. Rename NTUSER.DAT to NTUSER.MAN
  5. Open Computer Management > Local Users and Groups > Users > (create a new user) > (open that newly created user) > Profile > (on profile path, set it to that folder)
  6. Disable the user that you just copied (since you don’t want people to login to there)

When you’re finished and log in the new account, you will find out it performs almost like kiosk mode that you have been seeking for. To undo changes, log off and log back in.

Alex
  • 23,004
  • 4
  • 39
  • 73
0

I had the exact same problem, and form what I know unless you're using a self-made rootkit to disable the Charms Bar there's no way to do it. That's the way I've been operating after considering all the other options.

To save you some time here's what won't work.

  • Classic Shell.
  • Start Menu Suite.
  • Registry Edit of EdgeUI.
  • Disabling by rightclicking start menu -- though you should do this to disable other features.

Here are some options that may work, though not pretty. Look into the following:

  • Sideloading Apps
  • Recreating a Windows Store App
  • Rootkit

Otherwise, there's not much you can do. I would love to hear how you solved this though.

Check out a similar question I asked: Kiosks in Windows 8 Running Regular Software (Non-Windows Store App)

Community
  • 1
  • 1
steviesh
  • 1,740
  • 6
  • 19
  • 33
0

Kill explorer.exe when your application launches and charms bar won't work.

mcont
  • 1,749
  • 1
  • 22
  • 33
0

I know it might be a bit late to answer this question but hopefully this helps someone else, in your Regedit there is a regkey that allows you to choose what 'Shell' windows boots into, by default it is set to explorer.exe if you change this it will boot into whatever program that you would like without going through the stupid windows 8 start menu.

Regkey is at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\shell

Hope that helps you all.

TravisF
  • 459
  • 6
  • 13
0

Simple solution, not perfect but works, every time the charms bar is activate, your application is deactivate, so reactivate it immediately and the charms bar disappear. add this in your App.xaml.cs

DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer();
    public App()
    {
        this.Deactivated += App_Deactivated;
        this.Activated += App_Activated;
        timer.Tick += delegate
        {
            Application.Current.MainWindow.Activate();
        };
        timer.Interval = new TimeSpan(0, 0, 0, 0, 10);
    }

    void App_Activated(object sender, EventArgs e)
    {
        timer.Stop();
    }

    void App_Deactivated(object sender, EventArgs e)
    {
        timer.Start();
    }
Emmanuel
  • 7,574
  • 3
  • 24
  • 22
0

The year is 2018 and Window 10 almost completely pushed out Windows 8. Win8's "hot corners" are again cold in Win10 - they were obviously a great success. But if you still need to disable them in Win8.x/Win2012 and end up here searching for a solution (as I did), here's how I solved it. I realised that Windows disables them automatically if a full-screen application is active and covering the task-bar. Since my application is dialog-based and not full-screen, I create a transparent window (transparent optically and transparent for input) and set it as the parent window for my dialog. Now this invisible window covers the whole screen -> hot corners are disabled.

Something like this (simplified):

int nVirtualScreenLeft   = GetSystemMetrics (SM_XVIRTUALSCREEN);
int nVirtualScreenTop    = GetSystemMetrics (SM_YVIRTUALSCREEN);
int nVirtualScreenWidth  = GetSystemMetrics (SM_CXVIRTUALSCREEN);
int nVirtualScreenHeight = GetSystemMetrics (SM_CYVIRTUALSCREEN);

HWND hwndFullScreenInvisible = CreateWindowEx(
    WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW,
    _T("Static"), strWindowCaption,
    WS_VISIBLE | WS_POPUP,
    nVirtualScreenLeft, nVirtualScreenTop, nVirtualScreenWidth, nVirtualScreenHeight,
    HWND_DESKTOP, NULL, NULL, NULL);

if (hwndFullScreenInvisible != NULL)
{
    BOOL bRet = SetLayeredWindowAttributes (hwndFullScreenInvisible, /*COLORREF = */ 0, /* byAlpha = */ 0, LWA_ALPHA);
}

CMyDlg dlg (CWnd::FromHandle(hwndFullScreenInvisible));
dlg.DoModal ();
Vanja
  • 46
  • 2
-2

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\EdgeUI\DisableTLcorner DWORD=1

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\EdgeUI\DisableCharmsHint DWORD=1

ckglobalroaming
  • 267
  • 3
  • 10