Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Autologon to local admin account instead of domain

Recommended Posts

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?


Share this post

Link to post
Share on other sites

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.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-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.

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...