How to Disable DHCP When Deploying Vista/Server 2008 Using Sysprep and Unattend.xml

Discussion in 'Windows Vista Installation' started by dln, Nov 10, 2008.

  1. dln

    dln Guest

    Hello all,

    I've run into a problem when trying to deploy either a Vista or Server 2008
    syspreped image in conjunction with an Unattend.xml file. My problem is
    this - the install, from start to finish, is supposed to be an unattended,
    build-to-plan image. Part of the install involves assigning a static IP
    address. Although I've been able to configure a static IP for the image, I
    can't seem to disable DHCP for the image.

    I have set the
    x86_Microsoft-Windows-TCPIP_neutral/Interfaces/Interface[Identifier="1"]/Ipv4Settings/DhcpEnabled
    value to "false" for configuration pass 4, but the setting is ignored for
    some reason. I'm a complete newb when it comes to the Vista/Server 2008
    deployment model so if someone could point me in the right direction, it
    would be appreciated.

    My unattend.xml file is listed below (Server 2008 listed, but the Vista one
    is more or less similar). I'm imaging the system using the command "sysprep
    /generalize /oobe /unattend:c:\sysprep\unattend.xml":

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
    <component name="Microsoft-Windows-ServerManager-SvrMgrNc"
    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">
    <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon>
    </component>
    </settings>
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-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">
    <EnableFirewall>true</EnableFirewall>
    <EnableNetwork>true</EnableNetwork>
    <Restart>Restart</Restart>
    <DiskConfiguration>
    <Disk wcm:action="add">
    <DiskID>0</DiskID>
    <WillWipeDisk>true</WillWipeDisk>
    </Disk>
    <WillShowUI>OnError</WillShowUI>
    </DiskConfiguration>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE"
    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">
    <SetupUILanguage>
    <UILanguage>en-US</UILanguage>
    </SetupUILanguage>
    <InputLocale>en-US</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UILanguageFallback>en-US</UILanguageFallback>
    <UserLocale>en-US</UserLocale>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-UnattendedJoin"
    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">
    <Identification>
    <JoinWorkgroup>Workgroup</JoinWorkgroup>
    </Identification>
    </component>
    <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">
    <ComputerName>CHANGEMe</ComputerName>
    <ProductKey>AAAAA-AAAAA-AAAAA-AAAAA-AAAAA</ProductKey>
    <RegisteredOrganization>Org Name</RegisteredOrganization>
    <RegisteredOwner>Product Services</RegisteredOwner>
    </component>
    <component name="Microsoft-Windows-TCPIP"
    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">
    <Interfaces>
    <Interface wcm:action="add">
    <Ipv4Settings>
    <DhcpEnabled>false</DhcpEnabled>
    <RouterDiscoveryEnabled>false</RouterDiscoveryEnabled>
    </Ipv4Settings>
    <Routes>
    <Route wcm:action="add">
    <Identifier>1</Identifier>
    <NextHopAddress>10.10.50.193</NextHopAddress>
    <Prefix>10.10.50.192/26</Prefix>
    </Route>
    </Routes>
    <Identifier>1</Identifier>
    <UnicastIpAddresses>
    <IpAddress wcm:action="add"
    wcm:keyValue="1">10.10.50.195/26</IpAddress>
    </UnicastIpAddresses>
    </Interface>
    </Interfaces>
    </component>
    <component name="Microsoft-Windows-DNS-Client"
    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">
    <Interfaces>
    <Interface wcm:action="add">
    <DNSServerSearchOrder>
    <IpAddress wcm:action="add"
    wcm:keyValue="1">10.10.50.193</IpAddress>
    </DNSServerSearchOrder>
    <Identifier>1</Identifier>
    </Interface>
    </Interfaces>
    </component>
    <component name="Microsoft-Windows-Security-Licensing-SLC-UX"
    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">
    <SkipAutoActivation>false</SkipAutoActivation>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core"
    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">
    <InputLocale>en-US</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UILanguageFallback>en-US</UILanguageFallback>
    <UserLocale>en-US</UserLocale>
    </component>
    <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">
    <UserAccounts>
    <AdministratorPassword>
    <Value>some encrypted value</Value>
    <PlainText>false</PlainText>
    </AdministratorPassword>
    </UserAccounts>
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <NetworkLocation>Work</NetworkLocation>
    <ProtectYourPC>1</ProtectYourPC>
    <SkipUserOOBE>true</SkipUserOOBE>
    </OOBE>
    </component>
    </settings>
    <cpi:eek:fflineImage
    cpi:source="wim:c:/windows/system32/sysprep/panther/install.wim#Windows
    Longhorn SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
     
    dln, Nov 10, 2008
    #1
    1. Advertisements

  2. dln

    dln Guest

    I figured it out. I needed to specify "Local Area Connection" as the
    Interface Identifier instead of an index number.

    Thanks anyway.

     
    dln, Nov 10, 2008
    #2
    1. Advertisements

  3. dln

    Andrew2506 Guest

    It doesn't work anyway
     
    Andrew2506, Nov 21, 2008
    #3
  4. dln

    dln Guest

    Yeah, after much frustration, I came to that conclusion. I ended up running
    a synchronous script in the specialize phase that executes netsh to set the
    network parameters. The script is part of the image so it's always there.
    Works like a charm.
     
    dln, Nov 21, 2008
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.