Automatically Sign in to User Account at Startup in Windows


FreeBooter

Well-known member
Power User
VIP
Local time
2:11 PM
Posts
691
OS
Windows 11
With the attached batch script you can turn on automatic sign in for a domain, local, or Microsoft account.


2021-12-31_12-15-34.png


Code:
:: Automatically Sign in to User Account at Startup in Windows



@Echo Off & Color 0E


:::
:::           ·   ·▐ ▄ ▄▄▄ .▄▄▄  ·▄▄▄▄▪  ·  ▪
:::             · •█▌▐█▀▄.▀·▀▄ █·██▪ ██   .
:::           ▪   ▐█▐▐▌▐▀▀▪▄▐▀▀▄ ▐█· ▐█▌   ▪
:::            · ▪██▐█▌▐█▄▄▌▐█•█▌██. ██ .   .
:::           ▪   ▀▀ █▪ ▀▀▀ .▀  ▀▀▀▀▀▀•  ▪
:::           ▄▄▄  ▄▄▄ . ▌ ▐·  .   ▄▄▌ ▐▄▄▄▄▌
:::           ▀▄ █·▀▄.▀·▪█·█▌▪     ██•  •██
:::           ▐▀▀▄ ▐▀▀▪▄▐█▐█• ▄█▀▄ ██▪   ▐█.▪
:::           ▐█•█▌▐█▄▄▌ ███ ▐█▌.▐▌▐█▌▐▌ ▐█▌·
:::              .▀  ▀ ▀▀▀ . ▀   ▀█▄▀▪.▀▀▀  ▀▀▀
:::        (ccc)2021 by {FreeBooter} @NerdRevolt https://discord.gg/XbgGxrw
:::
:::    /// ::: /// ::: /// ::: /// ::: /// :::




(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)


:_CHOICE

Cls & Mode CON  LINES=11 COLS=110 & Color 0E & Title Coded By FreeBooter
Echo.
Echo.
Echo.
Echo        1 - Turn On Automatic Sign in for a Domain, Local, or Microsoft Account
Echo.    
Echo        2 - Turn Off Automatic Sign in for All Users
Echo.


Set /p input=:^>

If Not %input%==1 (Goto :_Ex) Else (Goto :_AutoSign)

:_Ex
If Not %input%==2  (Goto :_CHOICE) Else (Goto :_Disable)




:_AutoSign

Cls

Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f  2>&1 > Nul

Echo.
Echo.
Echo Type the computer name (ex: %COMPUTERNAME%) or domain name
Echo.

Set /p Computer_Name=:^>

Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d "%Computer_Name%" /f  2>&1 > Nul

Cls

Echo.
Echo.
Echo Type the user name (ex: %UserName%) of the account you want to automatically be signed in to at startup
Echo.

Set /p User_Name=:^>

Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName  /t REG_SZ /d "%User_Name%" /f  2>&1 > Nul

Cls


Echo.
Echo.
Echo Type the password (not PIN) of the user account you want to automatically be signed in to at startup
Echo.

Set /p Password=:^>

Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword  /t REG_SZ /d "%Password%" /f  2>&1 > Nul

Cls

Exit





:_Disable


Reg Add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f  2>&1 > Nul


Reg Delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f  2>&1 > Nul


 

Attachments

  • AutoLogon.bat
    2.8 KB · Views: 2
Last edited:

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

imanlien2020

Active member
Member
Local time
6:11 AM
Posts
131
OS
Windows 10 current
you can do that or use Autologon.
Autologon
 

My Computer

System One

  • OS
    Windows 10 current
    Computer type
    PC/Desktop
    Manufacturer/Model
    AMD
    CPU
    AMD Ryzen 7 5800X 8 Core
    Motherboard
    Gigabyte X570 Aorus Pro WiFi
    Memory
    32 GB
    Graphics Card(s)
    PCI Express 3.0 x16: PowerColor RX Vega 56 Red Dragon
    Sound Card
    Realtek ALC1220 and AMD Greenland - High Definition Audio Controller
    Monitor(s) Displays
    2 - 27 inch Westinghouse
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 SSD - 2 TB each
    1 HDD - 2 TB
    Keyboard
    logitech
    Mouse
    logitech
    Internet Speed
    200 MB
    Browser
    Microsoft Edge
    Antivirus
    Avast Premium
Top Bottom