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

D

dln

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:blush:fflineImage
cpi:source="wim:c:/windows/system32/sysprep/panther/install.wim#Windows
Longhorn SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
 
D

dln

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

Thanks anyway.

dln said:
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:blush:fflineImage
cpi:source="wim:c:/windows/system32/sysprep/panther/install.wim#Windows
Longhorn SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
 
D

dln

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top