Setting screen resolution in WinPE 4.0

In the previous WinPE version 2.x/3.x you could provide the below settings in the Unattend.xml file to set the screen resolution:

<Display>
	<ColorDepth>16</ColorDepth>
	<HorizontalResolution>1024</HorizontalResolution>
	<RefreshRate>60</RefreshRate>
	<VerticalResolution>768</VerticalResolution>
</Display>

The Problem

But if you try to do that in WinPE 4.0 it fails, and you will see the following entry in the wpeinit.log file:

2012-01-24 14:01:11.619, Info      WPEINIT is processing the unattend file [X:\unattend.xml]
2012-01-24 14:01:11.697, Info      ==== Initializing Display Settings ====
2012-01-24 14:01:11.712, Info      Setting display resolution [email protected]: 0xfffffffe
2012-01-24 14:01:11.728, Warning   Setting the display resolution failed; this error is being ignored
2012-01-24 14:01:11.728, Info      STATUS: SUCCESS (0x00000001)

The Solution

Turned out that WinPE 4.0 (developer preview of Windows 8) didn't like 16-bit color depth, so when changing to 32-bit it works perfect

<Display>
	<ColorDepth>32</ColorDepth>
	<HorizontalResolution>1024</HorizontalResolution>
	<RefreshRate>60</RefreshRate>
	<VerticalResolution>768</VerticalResolution>
</Display>

Complete sample:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <Display>
                <ColorDepth>32</ColorDepth>
                <HorizontalResolution>1024</HorizontalResolution>
                <RefreshRate>60</RefreshRate>
                <VerticalResolution>768</VerticalResolution>
            </Display>
        </component>
    </settings>
</unattend> 
About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
21 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Admin
Admin
7 years ago

WinPE 5.0 does support the same setting, but not on EUFI-based machines. You are better of continuing with your current workaround (or ship a magnifying glass with each tablet 🙂 ).

/ Johan

kantzy
kantzy
7 years ago

Changing the unattend.xml is not working in WinPE 5.0 as well. i am trying to deploy Windows 8.1 on a Lenovo Thinkpad 10 tablet in UEFI mode. The text looks too small and the drop down values are extremely small that they are almost unreadable. I am guessing the resolution might be around 1920 X 1080. I am currently managing by modifying the window.reiseTo and also using the style.zoom in the wizard.hta. Is there a better fix for this as we would need to start deploying Surface Pro in the enterprise soon and i am not sure how these HTA… Read more »

Admin
Admin
7 years ago

UEFI doesn't read the screen resolution (at least not in WinPE 4.0). If it uses the UEFI GOP video support, 1024×768 is the minimum though, see: msdn.microsoft.com/en-us/library/windows/hardware/hh997769.aspx.

/ Johan

aiva114
aiva114
7 years ago

Hi I recently build a wds server with MDT 2013 and Im experiencing this very same problem on our UEFI machines. The WinPe part just doesn't want to set correct resolution. Is there a know fix for this? As I cant find anything on Internet.

Admin
Admin
8 years ago

There seems to be an issue with setting the screen resolution via WinPE 4.0 when booted into UEFI mode. I have pinged a few folks that might know more, but for know I would recommend to configure your HTA to work with the default reslution.

/ Johan

Tripredacus
Tripredacus
8 years ago
Tripredacus
Tripredacus
8 years ago

The PE image is booted in UEFI mode. I found another person on MS Social that also has this issue in UEFI mode in changing the resolution.

Admin
Admin
8 years ago

I tested your unattend.xml file (that you posted in MSFN) and it worked fine in my WinPE 4.0 x64 image.

Did you try in a virtual machine, or on a physical machine?

/ Johan

Tripredacus
Tripredacus
8 years ago

I certainly did. I made this topic shortly after posting here.
http://www.msfn.org/board/topic/162510-unable-to-set-resolution-in-winpe4/

Admin
Admin
8 years ago

I have tested in WinPE 4.0 x64 and it works fine. Did you specify the amd64 architecture in the file?

Tripredacus
Tripredacus
8 years ago

This does not work in WinPE 4 x64 RTM. The wpeinit.log returns:

Info Setting display resolution [email protected]: 0xfffffffe
Warning Setting the display resolution failed; this error is being ignored

This was done using the -unattend switch with wpeinit.exe.

Admin
Admin
9 years ago

Email me the file and I will take a look, my alias is my last name, and I'm using gmail

/ Johan

Kevin King
Kevin King
9 years ago

Sorry, can't seem to get XML posted…

Kevin King
Kevin King
9 years ago

Sorry, can't seem to get XML posted…

Kevin King
Kevin King
9 years ago

Thanks for the quick reply. Turns out I was specifying x86 instead of amd64 in the xml file, and now it works. For reference, following is the XML (which I attached in the last entry but got eaten).

##
##
##
##
##
## 32
## 1280
## 60
## 1024
##
##
##
##

(This is a great website – very much needed.)

Admin
Admin
9 years ago

The settings need to be in the WindowsPE pass of the unattend.xml

/ Johan

Kevin King
Kevin King
9 years ago

I'm using the answer file referenced above but with the resolution set to 1280×1024. I injected the graphics driver in my image, and I know the display adapter supports this resolution in Windows 7, but I can't seem to get WinPE to change the resolution from 1024×768. I'm invoking Autounattend as an option to Wpeinit. Wpeinit.log says that it processed Autounattend.xml, that it's initializing display settings, but then "no display settings specified". Am I doing something wrong?

32
1280
60
1024

Thanks!

– Servant

Admin
Admin
9 years ago

The final ADK documentation will include all settings for the WinPE pass, check the unattend.chm file.

And the unattend.xml can be dynamically generated by a script in WinPE running before wpeinit.exe is called, so yes…

/ Johan

Naveed
Naveed
9 years ago

Hi,
Could someone refer me to a link that states all possible UNATTEND settings for Winpe? Also the default place should be System32 folder or Root?

Admin
Admin
9 years ago

Sure, as long as the unattend.xml file is updated before wpeinit.exe is run… You can have a script that updates the unattend.xml file dynamically when WinPE boots.

/ Johan

iceee
iceee
9 years ago

Hi Johan, is it possible to make the screen resolution dynamic?


>