Skip to content

Instantly share code, notes, and snippets.

@calumroy
Last active August 19, 2021 01:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calumroy/cfe38e216f1eec81ce55896e409fa6a3 to your computer and use it in GitHub Desktop.
Save calumroy/cfe38e216f1eec81ce55896e409fa6a3 to your computer and use it in GitHub Desktop.
Windows 10 automatically login and start a program.

Auto start a user program and hide windows 10 home from a user.

The goal is to setup a windows 10 home computer that automatically starts up and runs a user .exe program. No windows logos should be shown and the user should not be able to interact with other windows applications.

Upon shutdown of the .exe the computer should shutdown.

Regedit

Windows 10 home or pro doesn't allow you to directly set a classic windows app such as a user .exe program as the startup. We instead call a batch script that calls our .exe. instead.

A windows batch script is used to make a .exe run on startup.

The window registry has to be changed to acheive this.

Start regedit in windows

open the registry key:

 Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot\Shell

Type: REG_SZ

Value: SYS:Microsoft\Windows NT\CurrentVersion\Winlogon

Change the value to:

 USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Open the key:

 Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell

Type: REG_SZ

Value: Explorer.exe (or this can be a different default application)

Change the value to (a batch script location)

We could also have the batch script start a powershell window that then calls our .exe. The advantage of this is that on exiting the .exe we can get an exit code and then perform a particular function such as restart.

BCDedit Disable Windows logos while starting

Located at: C:\Windows\System32\bcdedit.exe
Run a powershell as administrator by right clicking the powershell.exe under C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe and selecting "run as admin".
Run the command: bcdedit.exe -set bootuxdisabled on

You can also disable the windows boot graphics by creating a provisioning package.

Autologin

You can make your Microsoft Windows 10 computer automatically login and bypass the login prompt whenever you start your computer by following this tutorial.
Hold the Windows Key and press “R” to bring up the Run dialog box.
Type “control userpasswords2” without quotes, then select “OK“.
Windows 8 control userpasswords2 in Run box
The “User Accounts” box appears. Uncheck the “Users must enter a user name and password to use this computer.” box. Select “OK” when you’re done.
Users must enter password check box
You will be prompted to enter the username and password for the account you wish to use automatically when Windows starts.
Type the User name and password in both the “Password” and “Confirm Password” fields, then select “OK“.

Remove windows 10 crude

see this tutorial on removing unneccessary windows 10 programs and services. https://gist.github.com/alirobe/7f3b34ad89a159e6daa1

Other options

If yu pay for a volume license (buy 5 or more windows 10 licenses) then you can get windows enterprise and this lets you setup a provisioning package that can do all this (also works with windows education).

You can trial windows enterpise for 90 days after which is complains that your windows is unactivated.

Also Windows enterpise LTSB is a vastly simplified windows 10 version that doesn't come with all the windows 10 crap. This also requires a windows enteprise license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment