Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Autologon to local admin account instead of domain

- - - - -

  • Please log in to reply
3 replies to this topic


  • Member
  • 2 posts
  • Joined 28-October 09
I'm sorry if this has been covered, but I've been looking for a couple days without finding a solution. I have been using RIS to deploy XP images, skipped over Vista and am working on creating deployment packages for Windows 7. With our XP images, once setup was complete the system logged on automatically using the local administrator account (even though the machine joined the network as part of the unattended install routine). It ran a script specified in the [GuiRunOnce] section of the answer file that mapped drives to our local network to install additional application and to do a few other things. Very simple and worked very well.

Obviously the Vista/7 methods of unattended installations are a lot different, and I'm still trying to piece it all together. Right now I have an unattended installation that seems to work fine - I can get it all the way to the Windows logon without any user input, and the machine is already joined to the domain. My question is; how can you use the Autologon setting to get it to log onto the local administrator account instead of the domain? I've tried leaving the 'Domain' field under Microsoft-Windows-Shell-Setup blank, but with that blank it tries to log into "." (.\Administrator). I am specifying the computername under Microsoft-Windows-Shell-Setup (4 specialize pass), and I suppose I could type the same computername into the Autologon-Domain field but it seems like there would be an easier way of doing this. This is also the same case for the RunSynchronous section. I'd like to specify that everything run under the local admin account. What am I supposed to type into the 'Domain' fields on the Autologon and RunSynchrounous-Credentials sections to get it to log onto the local accont rather than the domain?


How to remove advertisement from MSFN




  • Member
  • 44 posts
  • Joined 17-June 08
  • OS:Windows 7 x64
  • Country: Country Flag
You need to specify the Autologon section of Microsoft-Windows-Shell-Setup in the oobeSystem setup pass. Basic answer file settings would be:

<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.micro...fig/2002/State" xmlns:xsi="http://www.w3.org/20...hema-instance">
<TimeZone>Your Time Zone goes here</TimeZone>
<SynchronousCommand wcm:action="add">
<Description>Initial Script to run</Description>
<SynchronousCommand wcm:action="add">
<Description>Post Configuration Script</Description>

Note the above assumes x64 OS version, processorArchitecture="amd64", if installing 32-bit OS version change processorArchitecture="amd64" for processorArchitecture="x86" in the above.


  • Member
  • 2 posts
  • Joined 28-October 09
Thanks for your reply. I have specified the Autologon in the oobeSystem setup pass. Using WSIM, there is a setting for Domain, and this is what seems to be throwing it off. If I leave it blank, it assumes "." as the domain when it tries to log in, which of course is not successful. The only way I've been able to get it to work is to type the computername into the Domain field but I'm really trying to get away from having to doctor the unattended file for each install. If I manually edit the answer file to remove the Domain line, I get the same result as if I leave the field blank in WSIM.

Is the setting different for Windows 7 than from Vista? I would have posted this question in the 7 forum, but it seemed like that was mainly for newer features and not so much the basic stuff like this.

Thanks again.


  • Member
  • 1 posts
  • Joined 22-May 14
  • OS:Windows 8.1 x64
  • Country: Country Flag

I spent hours upon hours trying to figure out how to fix this and finally came up with this solution.


Run this command to set the logon user to the local Administrator account. If you are using a different local account enter that name instead of Administrator.

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d ".\Administrator" /f

You can add this as a command in the answer file or any other method you want as long as you do it before joining the domain.


After everything is done I then run this to unset the logon user.

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f

Edited by Jagster, 22 May 2014 - 06:20 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users