Solved

Autounattend.xml, Re-arm, KMS and Windows 7

Posted on 2013-11-28
7
562 Views
Last Modified: 2013-12-02
We are currently implementing a KMS server.

I have created an image and applied an autounattend.xml file for sysprep.

I suspect that the settings I have in there are wrong.

I believe they are wrong because once the image has rebooted I am having to run slmgr /rearm, reboot, run slmgr /ato, reboot for Windows 7 to be activated.

The section I think is responsible is this :

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-Security-SPP" 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">
            <SkipRearm>1</SkipRearm>
        </component>



Am I right in my assumption and how do I correct this please ?
0
Comment
Question by:Simples
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 27

Expert Comment

by:Jason Watkins
ID: 39683814
The re-arm section there allows you to keep sysprepping Windows 7 before it times out. One can only sysprep a Windows install a certain number of times. 3, I think it is.

See step seven here, which takes you through sysprep from start to finish.

http://theitbros.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish/
0
 

Author Comment

by:Simples
ID: 39684941
Sorry but that doesn't really answer my question. That is a general how to sysprep guide.

 What I need is how do I stop having to run the slmgr commands before the PC will be licenced?

I don't want to have to run those commands on many hundreds of PC's
0
 
LVL 27

Expert Comment

by:Jason Watkins
ID: 39685150
Add the following to your unattend.xml file

Under oobeSystem, amd64_Microsoft-Windows-International-Core_6.1.7600.16385_neutral


FirstLogonCommands

CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (windows 7 license key)
Order 1
RequiresUserInput: false
CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ato
Order 2
RequiresUserInput: false

SynchronousCommand[Order="1"]

SynchronousCommand[Order="2"]
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:Simples
ID: 39685602
Thanks but that didn't work. It parses OK but I still have to run those slmgr commands. The section of xml is below so I'm hoping you can see what I have done wrong (we are on x86 by the way):

<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">
            <AutoLogon>
                <Password>
                    <Value>Blah blah blah=</Value>
                    <PlainText>false</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <LogonCount>1</LogonCount>
                <Username>Administrator</Username>
            </AutoLogon>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <NetworkLocation>Work</NetworkLocation>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
            <UserAccounts>
                <AdministratorPassword>
                    <Value>Blah blah blah =</Value>
                    <PlainText>false</PlainText>
                </AdministratorPassword>
            </UserAccounts>
            <WindowsFeatures>
                <ShowMediaCenter>false</ShowMediaCenter>
                <ShowWindowsMail>false</ShowWindowsMail>
            </WindowsFeatures>
            <FirstLogonCommands>
            CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 ( Key is in the Public Domain )
            Order 1
            RequiresUserInput: false
            CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ato
            Order 2
            RequiresUserInput: false
            SynchronousCommand[Order="1"]
            SynchronousCommand[Order="2"]
          </FirstLogonCommands>


Thanks
0
 
LVL 27

Accepted Solution

by:
Jason Watkins earned 500 total points
ID: 39686032
have you tried with a file named "unattend.xml"? In my experience, that is the only file name Windows' sysprep picks-up.
0
 

Author Closing Comment

by:Simples
ID: 39689333
Bingo !
500 points gratefully coming your way. An excellent result, thank you very much.
0
 
LVL 27

Expert Comment

by:Jason Watkins
ID: 39690010
Glad to help!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question