I have been getting quite a few questions about networking in WinPE and how to map a network drive correctly. There are many different components to this whether that is automatically or manually. The quickest way to do it via command prompt is with the following command format... net use O: \\%servername%\%sharename% /user:%user% %password% Or net use Z:\\HAL2008\machineimages /user:Admin1 YMYF Remember when doing this that you should never setup a network drive to map the drive letter "X:" because WinPE uses this drive as the default drive letter for the operating system much as regular windows uses the default of C:\.
Saturday, June 7, 2008
Wednesday, June 4, 2008
Change the Desktop Resolution
The default resolution of Windows PE is 800 x 600. The obvious problem with this is that most applications are designed for 1024 x 768. Modifying the PE resolution is not the easiest of tasks to accomplish automatically but is entirely possible. The most common way to do this is by using an application called Setres. It is created by Ian Sharpe and is widely used by many that utilize Windows PE in a non-corporate environment. The not-so-obvious problem with this is legalities. Using applications that albeit free they may not necessarily be legal to distribute. This can present a legal nightmare to companies that create duplicates of their WinPE disks for different employees. There is a very easy solution to this that not only accomplishes everything Setres does but substantially more. And best of all its already included by default in Windows PE 2. wpeinit.exe It is used for executing an unattended script to allow for automated installation in Windows Vista. There are many different components of this but I will cover only the basics for now. This is my simple unattend.xml script for setting my screen resolution as well as creating a pagefile and starting my networking. SetPEoptions.xml
<?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"> <Display> <ColorDepth>32</ColorDepth> <HorizontalResolution>1024</HorizontalResolution> <VerticalResolution>768</VerticalResolution> </Display> <EnableNetwork>true</EnableNetwork> <EnableFirewall>true</EnableFirewall> <PageFile> <Path>C:\Pagefile.sys</Path> <Size>1024</Size> </PageFile> </component> </settings> </unattend>You can manually execute this script each time but it is much better if you have it executed automatically in your startnet.cmd or other batch file. This helps to keep the manual steps to a minnimum when using WinPE. Once you have your xml document created you can place it in your Windows directory in your PE wim or anywhere else so long as you remember where you put it. The command if it is placed in the Windows directory would like this to execute the script: wpeinit.exe /unattend=X:\Windows\SetPEoptions.xml I will expand on the unattended scipts in a future posts to help show more of its features.
Labels: networking, pagefile, screen resolution, unattend, wpeinit
Posted by Paul Mathews at 6:16 PM 4 comments