Solved

Unattended XML settings

Posted on 2016-08-29
4
75 Views
Last Modified: 2016-09-07
Hi all,


I have this unattended script that we are trying to use with LANDesk for system deployments.

We have experiencing issues when trying to using the script and errors such as this appear.

Can someone assist me with correcting these script errors?

This message appears when I use this xml file that is attached

Errors
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
	<settings pass="auditSystem">
		<component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="AMD64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DriverPaths>
			<DriverPaths><PathAndCredentials wcm:keyValue="1" wcm:action="add">
				<Path>c:\windows\LDDriverStore</Path>
				</PathAndCredentials>
			</DriverPaths>
		</component>
<component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
      <UserAccounts>
        <AdministratorPassword>
          <PlainText>true</PlainText>
          <Value>%AdminPass%</Value>
        </AdministratorPassword>
      </UserAccounts>
      <AutoLogon>
        <Enabled>true</Enabled>
        <Username>Administrator</Username>
        <Password>
          <PlainText>true</PlainText>
          <Value>%AdminPass%</Value>
        </Password>
        <LogonCount>1</LogonCount>
      </AutoLogon>
	</component>
</settings>
<settings pass="auditUser">
		<component name="Microsoft-Windows-Deployment" processorArchitecture="AMD64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<RunSynchronous>
		<RunSynchronousCommand wcm:action="add">
		<Order>1</Order>
		<Path>c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /reboot </Path>
		</RunSynchronousCommand>
		</RunSynchronous>
		</component>
		</settings>
		<settings pass="generalize">
		<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="AMD64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
		</component>
		</settings><settings pass="oobeSystem">
		<component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="AMD64">
		<OOBE>
			<HideEULAPage>true</HideEULAPage>
			<ProtectYourPC>1</ProtectYourPC>
			<SkipMachineOOBE>true</SkipMachineOOBE>
			<NetworkLocation>Work</NetworkLocation>
			<SkipUserOOBE>true</SkipUserOOBE></OOBE>
			<ProductKey></ProductKey>
		  </OOBE>
			<RegisteredOwner></RegisteredOwner>
			<RegisteredOrganization></RegisteredOrganization>
<UserAccounts>
        <AdministratorPassword>
          <PlainText>true</PlainText>
          <Value>%AdminPass%</Value>
        </AdministratorPassword>
      </UserAccounts>
      <AutoLogon>
        <Enabled>true</Enabled>
        <Username>Administrator</Username>
        <Password>
          <PlainText>true</PlainText>
          <Value>%AdminPass%</Value>
        </Password>
        <LogonCount>1</LogonCount>
      </AutoLogon>
		</component>
</settings>
		<settings pass="specialize">
	<component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="AMD64">
	<ComputerName>%ldHostname%</ComputerName>

			</component>
		</settings>
	</unattend>

Open in new window

0
Comment
Question by:nappy_d
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:oBdA
ID: 41775051
Not a big surprise - you have two syntax errors in there.
1. In line 5, you're opening DriverPaths, in the next line you're opening another DriverPaths, and only the second node is closed in line 9. In line 10, the component node opened in line 4 can't then be closed anymore.
2. In line 45, you're opening OOBE, and closing it in line 50 and in line 52 again.

If you're editing the XML manually, then it's way faster to use an XML validator than installing the system to check the validity.
One of many examples:
XML Validator
http://www.w3schools.com/xml/xml_validator.asp
1
 
LVL 32

Author Comment

by:nappy_d
ID: 41776252
Thanks for your assistance so far.  After that correction, Window during OOBE finds an error at line 28 and then stops .

My entire xml is a mess then to top it off, following the instructions from LANDesk tech support did not help then their response; "We are not unattended xml file experts, find some one local to you to help correct this."

Ugh.
0
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 41776296
The unattend.xml is not really meant for manual creation. You usually do that with the AIK/ADK and the Windows System Image Manager.
The Windows® Automated Installation Kit (AIK) for Windows® 7
https://www.microsoft.com/en-us/download/details.aspx?id=5753

Windows 7: Deploying Windows 7
https://technet.microsoft.com/de-de/magazine/hh241307.aspx

Here's a web service (untested):
Windows Answer File Generator
http://windowsafg.no-ip.org/
0
 
LVL 32

Author Closing Comment

by:nappy_d
ID: 41788913
Thanks for the link.  Since I am using LANDesk, this xml this site generates does not work but it definitely helped me to find some errors in my unattend script to work through
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now