/build/static/layout/Breadcrumb_cap_w.png

Windows 7 (32-Bit) Auto-Login

I know this has been already answered else where... but could someone help me in my scripted install of Windows 7 (32-Bit) Auto-login of local workgroup account.

Delete the setup account.

Local administrator account enabled

and the auto-login account enabled with, password, password doesn't expire, and user cannot change password.

Here is what I currently have:

start /wait net user administrator /active:yes
start /wait net user administrator password
start /wait net user SSCC password /add /fullname:"SSCC" /expires:never /passwordchg:no /active
start /wait wmic useraccount where Name='SSCC' set PasswordExpires=False
start /wait net user SSCC /active:yes
start /wait net localgroup groupname SSCC /add
start /wait net user kaceadmin /delete
del /Q /F C:\Users\kaceadmin
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d SSCC /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d sscc /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v ForceAutoLogon /d 1 /f

I have it working well on Windows 7 (64-Bit) with a couple extra reg keys that are required for 64-Bit.

 


 


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: SMal.tmcc 11 years ago
Red Belt
1

only thing I see is that you are setting user SSCC's password to password not sscc

start /wait net user SSCC password /add /fullname:"SSCC" /expires:never /passwordchg:no /active

should be

start /wait net user SSCC sscc /add /fullname:"SSCC" /expires:never /passwordchg:no /active


Comments:
  • That's the command I have... I just removed the admin and Sscc passwords from the script and replaced with password. - akilpatrick 11 years ago
    • I will test in my lab, it should work as you have it. - SMal.tmcc 11 years ago
  • If you remember, I had the same problem with x64... I have setup the x86 the same, minus the commands required for 64bit. I have setup my post install tasks the same and all too. - akilpatrick 11 years ago
    • The one thought I am looking at, you are deleting your logged in user mid script, my delete user command is one of the last things I do, I am running your script on a test deployment. The only difference I am doing is not deleting the local user account. - SMal.tmcc 11 years ago
  • Ok ran test with this script and it logs in auto. Try moving these to the end of your batch
    start /wait net user kaceadmin /delete
    del /Q /F C:\Users\kaceadmin
    you may also want to look at rmdir instead of del

    :::::::::::::::Start of script::::::::::

    net start w32time

    start /wait %SystemRoot%\system32\w32tm /config /update /manualpeerlist:ntp.tmcc.edu /syncfromflags:manual

    Start /wait net user administrator xxxxxxxxxxxxx
    Start /wait net user dfault xxxxxxxxxxxx

    start /wait cscript %SystemRoot%\System32\slmgr.vbs -ATO

    start /wait net user SSCC SScc123$ /add /fullname:"SSCC" /expires:never /passwordchg:no /active

    start /wait wmic useraccount where Name='SSCC' set PasswordExpires=False

    start /wait net user SSCC /active:yes

    start /wait net localgroup administrators SSCC /add

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d SSCC /f

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d SScc123$ /f

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v ForceAutoLogon /d 1 /f

    reg.exe DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /f - SMal.tmcc 11 years ago
  • OK, great! I will look into this. However, I will be out of the office, so I will do this when I return. Thank you for your help. - akilpatrick 11 years ago
  • Look in the registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon is there still a DefaultDomainName key? I am able to duplicate this on a test machine, that key is still there after removing the machine from the domain when I had autologon set before removing it. If that is the case you can add a reg /delete line to your script to nuke that key. - SMal.tmcc 11 years ago
  • OK, here is what I have in the script... it is still not working.. So, I removed all the post install tasks except the autologin script. Still a no go.

    start /wait net user administrator /active:yes
    start /wait net user administrator gr1zzly
    start /wait net user SSCC sscc /add /fullname:"SSCC" /expires:never /passwordchg:no /active
    start /wait wmic useraccount where Name='SSCC' set PasswordExpires=False
    start /wait net user SSCC /active:yes
    start /wait net localgroup groupname SSCC /add
    start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 0 /T REG_DWORD /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d SSCC /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d sscc /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v ForceAutoLogon /d 1 /f
    start /wait cscript C:\Windows\System32\slmgr.vbs -skms 10.1.1.53:1688
    start /wait cscript C:\Windows\System32\slmgr.vbs -ipk XXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXX
    "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\ospprearm.exe"
    start /wait cscript %SystemRoot%\System32\slmgr.vbs -ATO
    start /wait cscript "c:\program files\microsoft office\office14\ospp.vbs" /act
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v ipv6kill /d
    start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip6\Parameters\" /v DisabledComponents /t REG_DWORD /d 4294967295 /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v kclean /d "c:\kcleanup.exe"
    start /wait net user kaceadmin /delete
    rmdir C:\Users\kaceadmin
    Reply - akilpatrick 11 years ago
  • Sorry got in a hurry. - akilpatrick 11 years ago
    • no prob, let me know about the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultDomainName key - SMal.tmcc 11 years ago
  • This was a scripted install never on a workgroup, however the key exists. Doing some more test tomorrow. Didn't have much time today. - akilpatrick 11 years ago
  • So after testing again today... the following script is what I have and some reg keys are in place others are not...

    start /wait net user administrator /active:yes
    start /wait net user administrator password
    start /wait net localgroup administrators administrator /add
    start /wait net localgroup "remote desktop users" administrator /add
    start /wait net user SSCC sscc /add /fullname:"SSCC" /expires:never /passwordchg:no /active
    start /wait wmic useraccount where Name='SSCC' set PasswordExpires=False
    start /wait net user SSCC /active:yes
    start /wait net localgroup groupname SSCC /add
    start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 0 /T REG_DWORD /f
    netsh firewall set service type=FILEANDPRINT mode=ENABLE
    netsh firewall set service type=REMOTEDESKTOP mode=ENABLE
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d SSCC /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d sscc /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v ForceAutoLogon /d 1 /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v ipv6kill /d
    start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip6\Parameters\" /v DisabledComponents /t REG_DWORD /d 4294967295 /f
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v kclean /d "c:\kcleanup.exe"
    start /wait net user kaceadmin /delete
    rmdir /S /Q C:\Users\kaceadmin



    The keys that are missing or not configured correctly are:

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f

    Still set to 0

    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d sscc /f

    Missing completely



    When I manually add these and execute it works perfectly. Weird! - akilpatrick 11 years ago
    • No not to weird, Those keys will change to that exact state when the AutoLogonCount key reaches zero.
      Lets add:
      start /wait reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultDomainName /f
      start /wait reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /f

      after your netsh commands.

      and remove
      start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v ForceAutoLogon /d 1 /f - SMal.tmcc 11 years ago
  • That got it! You're such a great help! Thank you so much! - akilpatrick 11 years ago
    • Good thing I am not a doctor, by the time the problem was diagnosed the patient would have died. - SMal.tmcc 11 years ago
    • did those netsh lines solve your firewall problem? - SMal.tmcc 11 years ago
      • Yes, I used. Tested and working well.

        netsh firewall set service type=FILEANDPRINT mode=ENABLE
        netsh firewall set service type=REMOTEDESKTOP mode=ENABLE - akilpatrick 11 years ago
 
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