Solved

Unattended XML settings

Posted on 2016-08-29
4
99 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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Question has a verified solution.

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

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

947 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

20 Experts available now in Live!

Get 1:1 Help Now