When developing a build it is often useful to have it in debug mode. Debug mode is when log content is echoed to the screen during the build and all the logs, including variables.dat, are copied to the c:\windows\temp\bddlogs folder on completion. Ben Hunter covered off running single tasks or task sequences in debug mode in his blog. Here I will detail how to always enable it for LIteTouch - OSD is a different matter! This solution involves changing a core BDD/MDT file.
Before we make this change I just want to cover off what happens when you create your WinPE boot media. When WinPE boots it looks for an unattend.xml file in the root of its boot drive. If it finds one it can use the information there to control a number of things;
BDD and MDT have template unattend.xml files in the %ProgramFiles%\Microsoft deployment Toolkit\Templates or %ProgramFiles%\Microsoft BDD 2007\Templates directories. The files are called Unattend_PE_x86.xml or Unattend_PE_x64.xml - they are, initially both the same. If you open one you will see there are three entries under the windowsPE pass; Display, RunSynchronous and Restart. The one we are interested in is the RunSynchronous section.
NOTE: Before changing core BDD/MDT files I strongly recommend you make a copy of the files you are going to change and put them in a safe place.
In the RunSynchronous section is the command to launch LiteTouch.wsf. Edit this line to append /debug:true before the closing </Path> tag.
Save the file. Now in the workbench do a full refresh your deployment point so the WinPE CD is recreated. Boot from that and you should see the debug information echoed out to the screen and all the information available post build.
When you have finished developing your build simply reverse the steps outlined above. What I actually do is have two copies of the xml file - one with /debug:true in and one without. I then swap these in and out as required. Remember this setting is held on the WinPE CD so you could have two WInPE CDs; one with debug enabled and one without for normal user builds.
I have pasted a copy of my Unattend_PE_x86.xml file below. You could copy this and use it for your Unattend_PE_x86.xml file. If you use x64 as well as x86 you will need to make the change to both templates.
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <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"> <Display> <ColorDepth>16</ColorDepth> <HorizontalResolution>1024</HorizontalResolution> <RefreshRate>60</RefreshRate> <VerticalResolution>768</VerticalResolution> </Display> <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Description>Lite Touch PE</Description> <Order>1</Order> <Path>wscript.exe X:\Deploy\Scripts\LiteTouch.wsf /debug:true</Path> </RunSynchronousCommand> </RunSynchronous> <Restart>Restart</Restart> </component> </settings> </unattend>
This post was contributed by Richard Trusson a Senior Consultant with Microsoft Services UK.