Automatically Sign in to User Account at Startup in Windows


FreeBooter

Well-known member
Guru
VIP
Local time
5:00 AM
Posts
5,468
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

Last edited:

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
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
you can do that or use Autologon.
Autologon
 

My Computer My Computer

At a glance

Windows 11 Pro Version 23H2(OS Build 22631.4890)12-Core AMD Ryzen 9 5900X, 4950 MHz (49.5 x 100)4 - G Skill Trident Z Neo F4-3600C16-16GTZNCPCI Express 4.0 x16: PowerColor RX 6800
OS
Windows 11 Pro Version 23H2(OS Build 22631.4890)
Computer type
PC/Desktop
Manufacturer/Model
AMD
CPU
12-Core AMD Ryzen 9 5900X, 4950 MHz (49.5 x 100)
Motherboard
Gigabyte X570 Aorus Master
Memory
4 - G Skill Trident Z Neo F4-3600C16-16GTZNC
Graphics Card(s)
PCI Express 4.0 x16: PowerColor RX 6800
Sound Card
Realtek ALC1220 @ AMD K19.2 - High Definition Audio Controller
Monitor(s) Displays
2 - 27 inch Westinghouse
Screen Resolution
1920 x 1080
Hard Drives
2 SSD - 2 TB each
1 SSD - 4TB
1 HDD - 2TB
Keyboard
logitech
Mouse
logitech
Internet Speed
1 GB
Browser
Firefox
Antivirus
Eset Endpoint Security

My Computers My Computers

  • At a glance

    Windows11 Pro 25H2i732GBnVidia
    OS
    Windows11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus
    CPU
    i7
    Motherboard
    z97k
    Memory
    32GB
    Graphics Card(s)
    nVidia
    Sound Card
    Realtek
    Hard Drives
    3
    Cooling
    air
    Browser
    Edge
    Antivirus
    ESET
  • At a glance

    Windows11 ProIntel i516GBIntel
    Operating System
    Windows11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS
    CPU
    Intel i5
    Motherboard
    ASUS Basic
    Memory
    16GB
    Graphics card(s)
    Intel
    Sound Card
    Realtek
    Monitor(s) Displays
    Samsung
    Hard Drives
    one intern , 0ne extern, OS on SSD
    Cooling
    air
    Keyboard
    wireless Logitech
    Mouse
    wireless Logitech
    Internet Speed
    1GB
    Browser
    Edge
    Antivirus
    ESET
Back
Top Bottom