Auto Login After GPUPDATE /FORCE

I have the following script for auto login:
net start w32time
%SystemRoot%\system32\w32tm /config /update /manualpeerlist:hawaiicounty.gov /syncfromflags:manual

c:\windows\w2d\ksleep 10
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 10  /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultDomainName /d domain  /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d username  /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d password /f

This is my gpupdate /force bat file:
gpupdate /force /logoff
wuauclt /a /Detectnow
wuauclt /r

For my post-install tasks, I enable local admin, enable auto login, join domain, activate windows and gpupdate.  However, after logging off, the computer is stuck at the ctrl-alt-delete screen and doesn't auto login with the credentials in my gpupdate post install task.

Anyone know why?  Thanks!

0 Comments   [ + ] Show comments

Answers (4)

Posted by: SMal.tmcc 5 years ago
Red Belt
Is it not rebooting with your gpupdate batch script?  If that is when it happens check the "reboot required" for that batch task. 

  • I checked the "reboot required" for the gpupdate bat task and now it's in a loop. It keeps running gpupdate and stops at the ctrl-alt-del screen. - lnovak 5 years ago
    • remove the /logoff - SMal.tmcc 5 years ago
      • the check box will take care of restarting after all 3 commands are launched. Using /boot or /logoff switches then ceases the batch running. Let Kace handle the restart in any task you create instead of using restart switches. - SMal.tmcc 5 years ago
Posted by: lnovak 5 years ago
Third Degree Blue Belt
Thanks for all the responses!  The answer that worked for me was SMal.tmcc's where I remove all the switches, with the exception of /force and check the restart in the task.
Posted by: liam.creaser 5 years ago
Yellow Belt
Try changing it to  /boot

example: gpupdate /force /boot This tells the computer to restart the computer instead of just logging off.
Posted by: chucksteel 5 years ago
Red Belt
Unless you specify ForceAutoLogin in the registry the computer will only automatically login after a restart, so you need to restart after the gpupdate command.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ