We use Windows PE for repaving our Windows XP Embedded environments – it’s basically a DOS replacement that allows us to repartition hard disks. The machines we’re using it on are not hooked up to a network (although they do have network ports) and consequently Windows PE takes an age to boot up as it seems to always search for a network. The standard method for starting WinPE is to just call wpeinit from your start script, but it is possible to supply an xml configuration file that allows you to enable/disable various elements of the environment. Specifically, you can disable networking, which is what we want (all we do is repartition the hard disk and copy some files over). So, the xml we need is:
<?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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <EnableNetwork>false</EnableNetwork> </component> </settings> <cpi:offlineImage cpi:source="" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>And then we can supply this to wpeinit:
wpeinit /unattend=wpeinit_nonetwork.xmlThis reduces the boot time by 3 minutes which, when you’re doing it a lot, is quite significant.