How do I change automatic logon via Script or Command Line?
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle
--
Chapters
00:00 How Do I Change Automatic Logon Via Script Or Command Line?
01:07 Accepted Answer Score 20
01:47 Answer 2 Score 1
02:02 Answer 3 Score 0
02:15 Thank you
--
Full question
https://superuser.com/questions/340396/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #commandline #script #automaticlogon
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle
--
Chapters
00:00 How Do I Change Automatic Logon Via Script Or Command Line?
01:07 Accepted Answer Score 20
01:47 Answer 2 Score 1
02:02 Answer 3 Score 0
02:15 Thank you
--
Full question
https://superuser.com/questions/340396/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #commandline #script #automaticlogon
#avk47
ACCEPTED ANSWER
Score 20
One can change the registry via a .reg file.
For example, create an autologin.reg file containing :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="Administrator"
"DefaultPassword"="Pa$$w0rd"
Add DefaultDomainName
if required,
then just execute the file to get the values into the registry.
Or in a cmd script :
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d domainname /f
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d Administrator /f
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d Pa$$w0rd /f
(Warning: I didn't test the above.)
ANSWER 2
Score 1
Can't you just use sysprep /oobe
? It will finalize your install and show the welcome screen on reboot.
Read what sysprep
is and how sysprep
works for more information.
ANSWER 3
Score 0
Sysinternal's Autologon should be able to auto logon only once. That was a function when I've used it a while ago but I'm not seeing any details on whether it does that now.