When configuring a web-based kiosk for someone with Alzheimer’s disease, I wanted to start Chrome in full-screen kiosk mode.
Chrome full-screen kiosk mode
The secret for full-screen kiosk mode is to pass the -start-fullscreen
command-line option. Thanks [WayBack] User ginomay89 – Super User for answering that in [WayBack] tablet – How to set Google Chrome to automatically open up and in full screen – Super User.
Finding chrome
At first I thought about differentiating on the chrome.exe location that you can find in the registry. This turned out to be depending on how you install Chrome:
- locally for the current user by a non-local-administrator user (by default the location is under
%LocalAppData%
) - globally for all users by a local-administratator user (by default is under
%ProgramFiles(x86)%
)
Oddly, there is no way (not even by denying UAC elevation!) for a local administrator to install Chrome for only the current user.
This is odd, as when non-local-administrator denies UAC, the installation is locally to the user.
Then I remembered there are two ways for Windows to find an application
- On the
PATH
- Via the start menu (which includes anything on the
PATH
)- Rob van der Woude explains this works for documents with extensions in [WayBack] Batch files – The START command: Windows NT 4/Windows 2000 Syntax
- I found out this works for plain application names as well; this might be handled through the “
AppUserModelId
” values underHKEY_CLASSES_ROOT
; one day I will further research this through [WayBack] Application User Model IDs (AppUserModelIDs) – Windows applications | Microsoft Docs.
The cool thing is that the start
command does the latter, so I came up with this batch file that starts chrome with the -start-fullscreen
parameter that will initiate kiosk mode with the default chrome settings:
start "Chrome Kiosk Mode" chrome --start-fullscreen
In case I want to compare the registry settings
Basically sorting out the registry settings would mean parsing the references to chrome.exe (often with extra parameters) in the below registry key/value-name pairs.
One day I might need to do this for different reasons, but currently the start
trick suffices.