Tips and Tricks for working with Windows PE 2.1

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"
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.


Brian said...

How did you determine that this could be done? Did you have any references?

Alexandr said...

It's from Active@ Boot Disk :)

PointlessBlogger said...

Do you know how to create this same xml file, but for the x64 version of WinPE? Near the top of this one it's specifying x86 as the processor architecture. I tried just changing that to x64, but it failed...

torlani said...

best way to create an sample unattend.xml is to use the "Windows System Image Manager"

windows use the word amd64 to refer to x64 processorArchitecture="amd64"