Solved

Unattended XML settings

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding logon credentials during MDT windows 7 deployment 7 25
accidental deletion - ad recycle bin 3 19
PDF to JPG 13 44
PerfMon Report Time Out 6 22
OfficeMate Freezes on login or does not load after login credentials are input.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

785 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