autologon not working after domain join post install task
Hi there guys.
After adding the domain join to my post install
task in k2000, auto login is not working. Gives
incorrect password at logon screen. I need
to manually logon again to complete the clean up
process.... (auto logon from answer file, was using local admin account to loggon).
I think after joining to a domain ,there are two active
accounts on the machine , and it tries to logon to
the domain account, instead of the original account
from the image answer file.
Is there an auto logon script I can use as a post install
task to logon to a specific account after a restart. just
something I can add as a task to logon with any account
existing on the machine.
Thanks guys.
Answers (3)
(Note: I place the join_domain vbs file in my images with other IT type task files in the W2D directory)
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 academics /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d installer /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d password! /f
del C:\Users\Default\AppData\Local\Microsoft\Windows\webcache\*.* /f /q
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.log1 /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.log2 /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.blf /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\*.regtrans-ms /f /q /a:hs
del C:\Users\Default\AppData\Local\Microsoft\Windows\Explorer\*.* /f /q
del c:\users\default\downloads\*.* /f /q /s
start /wait cscript.exe c:\windows\w2d\join_domain.vbs academics.tmcc.edu installer password!
c:\windows\w2d\ksleep 10
Comments:
-
Hi SMal,
My image is already done. Don't want to go back and have to make a new gold image.
Any way I can do this as a post install task??
Just as my domain join is already a post install task.
Thanks. - akmagnum 8 years ago
sorry to confuse you I was just letting you know the reason why I am calling the vbs from the c: drive, I was giving you the process to adapt to your environment. That was my raw dump
I assume you already have a application task to join to the domain. You want to create a bat task that runs just before your join_domain.vbs application task that does this part.
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 academics /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d installer /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d password! /f
do not reboot between this bat task and the vbs app task. check reboot for you app task and that should work for you
Comments:
-
Hi SMal,
Great help. We are almost there......
Of course I want to login as the local admin I was using for auto logon before the domain join......
So will this script continue with the auto logon as before the joining of the domain?
Also, do I have to change anything on the script to
fit my environment? like username and password?
Do I need my computer name? cos if I do, I have no idea what it is. Since it was randomly generated by the image at install time. And by the time it reboots after domain join.....I have no choice but to login with domain admin account.....because I have never seen the PC name.
Thanks again SMal. - akmagnum 8 years ago-
see below to get local login - SMal.tmcc 8 years ago
Top Answer
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 3 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d Administrator /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d Password! /f
reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultDomainName /f
Comments:
-
Great SMa...Thanks - akmagnum 8 years ago