Building a GUI for Windows PE

I wasn’t exactly planning to get into this but I got carried away with my research a little and ended up working on this on and off for a while now. I’ve come to realise that this is quite a big project on its own and will potentially keep me away from working with MDT 2010 for some time.

So I’m stalling this project for now and publishing my notes on my research in this post. The point is to preserve my research, notes and the little work that I’ve done so that I can pick up from where I left off if I want to come back to it any time in the future. Also anyone who’s trying to get started with doing something similar to this may find having these notes useful.

I’ve included my notes and all the necessary files inside a zip file, along with a Read Me text document which explains the contents of the zip file in some detail. Please note that WordPress does not allow me to upload zip files so I’ve renamed the file with a .pptx extension. You will need to change it back to .zip to be able to extract the contents. Link to zip file: Notes on Building a GUI for Windows PE

I’ve reproduced the contents of the Read Me.txt file to give you an idea of what the contents of the zip file look like:

Building Windows PE to Support Scripting.docx

Notes on what packages to add to the Windows PE boot image which will allow scripts such as those below to work from within the Windows PE environment.

Launch GUI.cmd 

Startnet.cmd launches this script to prompt for username and password and then map a network share (where the WIM images are stored). If the share was mapped successfully it then launches the GUI. It is possible to determine if a command was run successfully by checking the %ErrorLevel% variable, which resturn 0 if a command was successful and 1 if unsuccessful.


A program to mask the user input in batch scripts, useful for password prompts. Downloaded from

Usage is:

editv64 -m -p “Password:  ” varPwd

Where the user input is assigned to the %varPwd% variable

“Draft GUI.hta” and “Draft GUI.htm”

HTML Application, written in HTML and VBScript with a .hta file extension. Please note this is a rough draft, hence there’s no styling. VBScript function “ShowWIMs” runs a loop searching for files with a .WIM extension in the network share (where the images are stored) and dynamically populates a drop down combo box to list the .wim images found in the network share. The idea is that the user will select a .WIM image to apply to the target machine by hitting a button. This is only a draft and needs a lot more work.

VBScript and WMI.docx

Useful links to using VBScript and WMI.


Notes on how everything is put together and how it works, including further improvements


2 thoughts on “Building a GUI for Windows PE

  1. Hi there

    Did you ever get back on the project ?

    Im currently in the process of reverse engineering a WinPE image that shows a GUI on boot.
    1. there is a script folder with scripts to capture an image (OOBE or fresh install)
    2. if the image is taken it is automatically added to the gui.

    I dont have much experience with WinPE but its a very interesting thing to spent time on :D

    • Hiya mate, thanks for commenting. You took me right back to my days when I was working on this. I actually discovered that MDT (Microsoft Deployment Toolkit) works exactly the same way I was attempting to implementing in my project. So I never went back to this project. Look up MDT, it’s free, I’m sure you’ll like it. I’ve got some posts on it too if you’re interested. Although I must admit working on your own solution is much more satisfying but at the same time I realised I’d be reinventing the wheel so I went on to MDT and I’m now a SCCM Engineer. I hope this path leads you onto bigger projects too. Have fun!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s