OEM Method to Enable Administrator Account

Discussion in 'Windows 7' started by Mr Jinje, Nov 7, 2009.

  1. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #1 Mr Jinje, Nov 7, 2009
    Last edited by a moderator: Apr 20, 2017
    Was thinking, why not use SetupComplete.cmd to enable the Administrator account and force Auto Login. M$ can force us to create an account, but they cannot force you to use it. This should both enable the Administrator account and create/delete the MrJinje account. Thus fulfilling the requirement to create an user account during install.

    SetupComplete.cmd
    Code:
    Net user administrator /active:yes
    Regedit /s %~dp0AUTOLOGIN.REG
    NET USER MrJinje /DELETE
    AUTOLOGIN.REG
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    "DefaultUserName"="Administrator"
    "DefaultPassword"=""
    "AutoAdminLogon"="1"
    "ForceAutoLogon"="1"
    Just add an AutoUnattend.xml and change the Net User Delete Script with whatever account name your use.

    Code:
    <UserAccounts>
       <LocalAccounts>
          <LocalAccount wcm:action="add">
             <Password>
                <Value></Value>
                <PlainText>true</PlainText>
             </Password>
             <DisplayName>MrJinje</DisplayName>
             <Group>Administrators</Group>
             <Name>MrJinje</Name>
          </LocalAccount>
       </LocalAccounts>
    </UserAccounts>
    Anyone care to confirm if this is working.
     
  2. SoLoR

    SoLoR MDL Expert

    Jul 30, 2008
    1,370
    1,256
    60
    #2 SoLoR, Nov 7, 2009
    Last edited by a moderator: Apr 20, 2017