DefaultDomainName registry tweak to Local Machine
Greetings all, I've seen many posts asking how to change the registry value "DefaultDomainName" to the desired AD domain upon boot up. My question is the opposite. I work at a high school and need to be able to mass login the computers to the local admin account. This would save our techs untold amounts of time when applying tweaks without having to re-image. I'm halfway there however I run into 2 problems. I have 2 scripts written, one to change the default values to autologin and one that reverts them back. Here is the autologin script: reg add "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f reg add "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d DOMAIN /f reg add "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d USERNAME /f reg add "\\%1\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d PASSWORD /f reg delete "\\%1\HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system" /v legalnoticecaption /f reg delete "\\%1\HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system" /v legalnoticetext /f shutdown /r /m "\\%1" /t 1 /f The undo script is basically the opposite. So when the computer reboots, is there a way to specifcy the Domain to local via a wildcard? Otherwise I would have to write 200 scripts with each computer name as the localhost/domain. As a sidenote, logging into the domain doesn't work. Upon reboot, it attempts to login before the NIC fully establishes connection to the network and I receive the message similar to "Unable to login because there are no servers available." Any help would be greatly appreciated. I just need one of those 2 to work. Logging into to local admin is preferred, but it would be the same if I could log into the domain as well. It just tries to login too fast. Best Regards
September 2nd, 2011 10:24am

Hi, I tried to repro you issue on my side. But when this problem occurs, I find the value of DefaultUserName is changed to another local user account on my computer. After I correct the value manually, it works fine. That’s an odd issue. I would transfer it to a senior engineer. And hope the problem could be solved soon. Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2011 4:45am

Hi, You can use the environmental variable %computername% to achieve your goal. For example, reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d %computername% /f Peterson Wu Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Peterson Wu Microsoft Online Community Support
September 8th, 2011 5:01am

Hi Peterson, I try to use folloing command to edit the registry: 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 fareast.corp.microsoft.com /f reg add "\\.\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d XXXX /f reg add "\\.\HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d XXXXXX /f After run these command sucessfully. I restart the computer, I get the same error --“Unable to login because there are no servers available.” I press ESC then I found the DefaultDomainName is correct, but the account isn't the one which I set(It changed to another local account). I logon my computer then check the registry. The value of DefaultUserName is changed. So I modify the value to my domain account. Restart my computer, then autologon works fine. I'm not sure that I was able to repro this problem. Whatever, I get the same error message. Unfortunately, I cannot repro this again. But I really want to know the reason. Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2011 5:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics