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.
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 http://www.westmesatech.com/editv.html
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