Category filter

Script to enable Windows automatic logon for screenless kiosk

Automatic logon in Windows is a feature that makes a specific user account accessible on the device without entering the username and password. This feature enables quick access to the device and in screenless kiosks, which don’t rely on display screens for user interaction. Instead, they utilize other input/output mechanisms like voice commands, RFID scanners, or physical buttons.

For screenless kiosks, administrators can set up auto logon with the help of a custom script. When setting up automatic logon for Windows screenless kiosk, it’s important to note that only the specific user account designated for the kiosk mode is accessible, with other user accounts remaining inaccessible. This script also ensures that devices never enter sleep mode.

Screenless kiosk mode with automatic logon can be integrated into both the single app kiosk and multi app kiosk features provided by Hexnode UEM. To enable screenless kiosk mode for a specific user account, IT administrators can deploy the necessary kiosk policy to the target device using Hexnode UEM. Once the policy is in place, they can execute the script to automate the user account login via the Execute Custom Script remote action.

Scripting language – PowerShell

File extension – .ps1

Disclaimer:


The sample script provided below is adapted from a third-party open-source site.

Turn on automatic logon in Windows

Here, the PowerShell script is designed to simplify the specific user account login and power settings on a Windows system. Replace Username and Password with the actual username and password of the kiosk user account whose login needs to be automated.

The script uses the Windows Registry, specifically targeting the path HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon to automate the user login by setting AutoAdminLogon to 1 and specifying the user account’s credentials with DefaultUsername and DefaultPassword.

Additionally, it creates a registry key under HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI to disable user account switching during login. The script further customizes power settings using powercfg commands, setting timeout to 0 to prevent the device from entering standby due to inactivity. Finally, the script forcefully restarts the computer with the help of Restart-Computer –Force command to apply the configured changes.

What happens at the device end?

Upon successful execution of the script, the device will restart, and automatically log into the specified kiosk user account without requiring the username and password, thus activating kiosk mode.

Portal output after implementing automatic logon for screenless kiosk on windows devices

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository