none
Windows activation | MAK | WDS Deployment with WAIK / AutoUnattend.xml

    Question

  • Hello,

    how can i activate windows 7 clients with a MAK Key during an unattended installation?

    A valid MAK Key is set in the SIM tool from WAIK (4. specialize | x86_Microsoft-Windows-Shell-Setup_neutral | ProduktKey)

    But windows does nt activate itself.

    i still need to execute those line after the installation.

    cscript C:\Windows\System32\Slmgr.vbs /ato

    any thoughts?

    Joel

    Friday, July 22, 2011 10:01 AM

Answers

  • i solved this problem in a very simple way:

    i created two FirstLogonCommands in (7. oobeSystem | x86_Microsoft-Windows-Shell-Setup_neutral | FirstLogonCommands)

    the first one runs cscript C:\Windows\System32\Slmgr.vbs /ato which triggers the activation.

    but this works only when you login with an Administrator Account because slgmr.vbs needs Administrative rights for the activationprocess.

    in order to this i created an AutoLogon with an administrative user. (7. oobeSystem | x86_Microsoft-Windows-Shell-Setup_neutral | AutoLogon)

    I set the logonCount = 1 so it occurs just ones.

    the second FirstLogonCommand simply reboots the machine.

     

    we are done. everything works fine!

     

    Here are the mentioned parts in the xml file:

      <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
            <NetworkLocation>Work</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
          </OOBE>
          <UserAccounts>
            <AdministratorPassword>
              <Value>*removed*</Value>
              <PlainText>false</PlainText>
            </AdministratorPassword>
            <LocalAccounts>
              <LocalAccount wcm:action="add">
                <Password>
                  <Value>*removed*</Value>
                  <PlainText>false</PlainText>
                </Password>
                <DisplayName>*removed*</DisplayName>
                <Name>*removed*</Name>
                <Group>Administrators</Group>
              </LocalAccount>
            </LocalAccounts>
          </UserAccounts>
          <Display>
            <ColorDepth>32</ColorDepth>
            <HorizontalResolution>1680</HorizontalResolution>
            <VerticalResolution>1050</VerticalResolution>
          </Display>
          <RegisteredOrganization>*removed*</RegisteredOrganization>
          <RegisteredOwner>*removed*</RegisteredOwner>
          <TimeZone>W. Europe Standard Time</TimeZone>
          <ShowWindowsLive>false</ShowWindowsLive>
          <FirstLogonCommands>
            <SynchronousCommand wcm:action="add">
              <CommandLine>cscript c:\Windows\System32\slmgr.vbs /ato</CommandLine>
              <Description>activate windows</Description>
              <Order>1</Order>
              <RequiresUserInput>false</RequiresUserInput>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
              <Order>2</Order>
              <CommandLine>shutdown -r -t 0 -f</CommandLine>
              <Description>shutdown after autologin</Description>
              <RequiresUserInput>false</RequiresUserInput>
            </SynchronousCommand>
          </FirstLogonCommands>
          <AutoLogon>
            <Password>
              <Value>*removed*=</Value>
              <PlainText>false</PlainText>
            </Password>
            <LogonCount>1</LogonCount>
            <Enabled>true</Enabled>
            <Username>WSB</Username>
            <Domain>*removed*</Domain>
          </AutoLogon>
        </component>
      </settings>
    



     

    • Marked as answer by Joel Buttlar Friday, July 22, 2011 1:44 PM
    Friday, July 22, 2011 1:44 PM

All replies

  • i solved this problem in a very simple way:

    i created two FirstLogonCommands in (7. oobeSystem | x86_Microsoft-Windows-Shell-Setup_neutral | FirstLogonCommands)

    the first one runs cscript C:\Windows\System32\Slmgr.vbs /ato which triggers the activation.

    but this works only when you login with an Administrator Account because slgmr.vbs needs Administrative rights for the activationprocess.

    in order to this i created an AutoLogon with an administrative user. (7. oobeSystem | x86_Microsoft-Windows-Shell-Setup_neutral | AutoLogon)

    I set the logonCount = 1 so it occurs just ones.

    the second FirstLogonCommand simply reboots the machine.

     

    we are done. everything works fine!

     

    Here are the mentioned parts in the xml file:

      <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
            <NetworkLocation>Work</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
          </OOBE>
          <UserAccounts>
            <AdministratorPassword>
              <Value>*removed*</Value>
              <PlainText>false</PlainText>
            </AdministratorPassword>
            <LocalAccounts>
              <LocalAccount wcm:action="add">
                <Password>
                  <Value>*removed*</Value>
                  <PlainText>false</PlainText>
                </Password>
                <DisplayName>*removed*</DisplayName>
                <Name>*removed*</Name>
                <Group>Administrators</Group>
              </LocalAccount>
            </LocalAccounts>
          </UserAccounts>
          <Display>
            <ColorDepth>32</ColorDepth>
            <HorizontalResolution>1680</HorizontalResolution>
            <VerticalResolution>1050</VerticalResolution>
          </Display>
          <RegisteredOrganization>*removed*</RegisteredOrganization>
          <RegisteredOwner>*removed*</RegisteredOwner>
          <TimeZone>W. Europe Standard Time</TimeZone>
          <ShowWindowsLive>false</ShowWindowsLive>
          <FirstLogonCommands>
            <SynchronousCommand wcm:action="add">
              <CommandLine>cscript c:\Windows\System32\slmgr.vbs /ato</CommandLine>
              <Description>activate windows</Description>
              <Order>1</Order>
              <RequiresUserInput>false</RequiresUserInput>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
              <Order>2</Order>
              <CommandLine>shutdown -r -t 0 -f</CommandLine>
              <Description>shutdown after autologin</Description>
              <RequiresUserInput>false</RequiresUserInput>
            </SynchronousCommand>
          </FirstLogonCommands>
          <AutoLogon>
            <Password>
              <Value>*removed*=</Value>
              <PlainText>false</PlainText>
            </Password>
            <LogonCount>1</LogonCount>
            <Enabled>true</Enabled>
            <Username>WSB</Username>
            <Domain>*removed*</Domain>
          </AutoLogon>
        </component>
      </settings>
    



     

    • Marked as answer by Joel Buttlar Friday, July 22, 2011 1:44 PM
    Friday, July 22, 2011 1:44 PM
  • Thanks a bunch!

    for me though, I disabled the built-in administrator after the activation

    net user administrator /active:no

    and also, instead of rebooting, just logged off instead.

    shutdown -l -f

    Thursday, June 07, 2012 7:19 PM