Solved

Unattended XML settings

Posted on 2016-08-29
4
159 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
[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
  • 2
  • 2
4 Comments
 
LVL 85

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 85

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
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…

691 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