Use K1 to Log in to Windows 7 Desktop?
Suppose I have a bunch of systems with nobody presently logged into them. Is it possible to script out a log in sequence?
Answers (2)
You can push a registry key to change to enable autologin and restart the machine
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 2 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultDomainName /d tmccacad /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d user /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d xxxxxxxx /f
shutdown -r -f -t 10
What is your end goal with a logon script? Are you trying to run a script or MI without someone logged on?
If so, you can do that in both since they run using LocalSystem. You can run as other users in a script as well as logged on user.
Comments:
-
I have some stuff that needs done which is only possible using a GUI, for which I have an AutoIT script. I would like to avoid logging in to each machine. - muebel 12 years ago