Opening the page so a visitor cannot leave it

You do not need a special "kiosk browser". Edge and Chrome are already on every Windows machine and will do it. deployment/start_kiosk_window.ps1 is our implementation of everything below; run that rather than assembling it yourself, and read this to understand what it does.

Use --kiosk, and place the window yourself. Everyone gets this wrong in one direction or the other:

--app= plus --start-fullscreen respects the monitor you name, but the window keeps a Chromium-drawn title bar that fullscreen only auto-hides. Touch the top edge of the glass and it slides back down, with minimise and close on it — on a screen whose entire purpose is that a visitor cannot get out of the page. Because it is drawn inside the client area, no Win32 trick removes it.

--kiosk has no such bar at all, and additionally disables the fullscreen toolbar reveal, ESC and Ctrl+W. Its one flaw is placement: it opens on the primary display and discards --window-position. So do not ask it — put the window where you want with SetWindowPos after launch. Once placement is yours, kiosk mode costs nothing.

msedge.exe --kiosk "http://127.0.0.1:8080/"
           --user-data-dir="%LOCALAPPDATA%\KioskTablet"
           --no-first-run --noerrdialogs --disable-session-crashed-bubble
           --disable-pinch --overscroll-history-navigation=0

Call SetWindowPos(hwnd, HWND_TOPMOST, x, y, w, h, SWP_NOACTIVATE | SWP_SHOWWINDOW) on the browser’s window once it appears.

Four details that each cost an afternoon if you skip them:

  • --user-data-dir is not optional. Without a profile of its own, a second launch simply hands the URL to the already-running browser and silently ignores everything else you asked for.

  • Ask Windows where the monitor is; never hardcode coordinates. A display placed to the left of the main one has negative coordinates, and anyone can rearrange them in Display Settings.

  • --disable-session-crashed-bubble, or every power cut leaves a "Restore pages?" bubble sitting on the tablet with nobody to dismiss it.

  • SWP_NOACTIVATE, and SW_SHOWNOACTIVATE if you restore the window. On a one-PC installation, Unreal is fullscreen on the other display. Taking the foreground from a fullscreen D3D window is a good way to make it minimise itself.

Then keep watching the window. Closing it kills the process and a supervisor brings it back, but minimising it does not. The process stays perfectly healthy behind a black touchscreen, and every health check on the box still reads green. A one-second loop that restores and re-places the window turns this outage into a flicker. Ours does this; if you write your own, do not skip it.

The browser cannot lock down the machine around it, so change a few Windows settings on a real kiosk: taskbar off the touchscreen, edge swipes off, notification toasts off, screensaver and sleep off. deployment/kiosk-24-7-setup.bat applies the set we use.

The page itself must also declare <meta name="google" content="notranslate">. Otherwise, Edge offers to translate the kiosk via a corner bubble that a visitor cannot be expected to dismiss, and the browser flag disabling Chromium’s translate does not reach Edge’s own.