Monthly Archives: August 2014

WinPE 5.0 GUI

In one of mine previous blogs, Creating a WinPE 5.x boot image with PowerShell, I’ve promised that I would provide more info about GUI that I’ve build for WinPE. You can read my post abut using WinPE GUI in order to create Dual Boot External USB Drive. But this time I’ve decided to build an interface for WinPE using Microsoft PowerShell in addition to an HTA application built in VBScript (ACBWinPEx64.hta and ACBWinPEx64.hta are included as well).

This interface is used in my blog about WinRE 10 with wireless support:

1. www.alexcomputerbubble.com/wireless-support-winre-10-part-two
2. www.alexcomputerbubble.com/wireless-support-winre-10-part-one

 

If you had a chance to read my blog about creating WinPE 5.0, you learned that I like to have a folder that will house and keep organized all my WinPE drivers, applications and configuration files. See the picture below that provides some info about the content of my WinPE-Plugin folder.

ACB_WinPEpluging

WinPE-Plugin folder has two subfolders Apps and Drivers that house 64 bit and 32 bit applications and drivers. Amd64 folder, for example contains all files and apps that I need in order to build my customized 64 bit WinPE.

WinPEx64BitFolderStructure

This is the list of applications included here:

  1. DevManView v1.41, http://www.nirsoft.net/utils/device_manager_view.html
  2. DriverView v1.46, http://www.nirsoft.net/utils/driverview.html
  3. ProduKey v1.66, http://www.nirsoft.net/utils/product_cd_key_viewer.html
  4. SearchMyFiles v2.48, http://www.nirsoft.net/utils/search_my_files.html
  5. NTPWEdit version 0.4 GPL, http://cdslow.webhost.ru/en/ntpwedit/
  6. PE Network Manager by Holger Kotsch, http://holger.reboot.pro/
  7. GImageX v2.1.0, http://www.autoitconsulting.com
  8. HWiNFO, http://www.hwinfo.com/
  9. Pale Moon Portable, http://www.palemoon.org/palemoon-portable.shtml
  10. Notepad2, http://notepad2.com/
  11. Explorer++ 1.3.5, https://explorerplusplus.com/download

Please note that you should always visit the home page for each listed application and download the latest version by yourself from its developer site. In addition, note that a small utility named ProduKey from www.nirsot.net some Antivirus scanners report as infected with a Virus or Trojan, even when the program is not really infected with any malicious code. This kind of problem is known as “False Positive” or “False Alert”, and it’s quite a common problem in some of the password recovery tools provided in NirSoft Web site.

One very important file, named startnet.cmd is responsible for running start-up scripts when WinPE first runs, and its content look like the following:

ACB_WinPE_startnet

As you can see from the file’s content, it initializes the network settings, disables firewall, runs unattend file to set resolution and at the very end starts PowerShell GUI application named: ACB-WinPEx64.ps1 (note that for 32 bit architecture the name of GUI application is ACB-WinPEx32.ps1). I want to start interface in PowerShell, and my HTA application in the batch file is behind the REM command. If you want to use HTA application, please just remove comment in front of HTA application and paste it in front of line that starts PowerShell script.

WinPE – PowerShell GUI

This application has three tabs: Computer Info, Network and Applications. On all tabs there is an image, named “Gears” that I like very much so I had to stick it on all the three tabs. This image is from the portfolio of “Master isolated images“. It is acourtesy of Master isolated images and obtainedfrom site: www.freedigitalphotos.net.

The first tab, The Computer Info, displays info about computer’s hardware (make, model, serial, NIC, etc.) and the drives. By clicking on View Drivers button, you can list all the drivers loaded in WinPE session. From this tab, just like all the others, you can use buttons to start CMD command, restart or shutdown a computer.

WinPEone

The second tab, Network, displays WinPE drives and drives mapped during WinPE session. You can use Network Manager to refine network settings and NIC. In addition you could use WinPE network connection to map additional drives (for example a share that contains .Wim files). WinPE-Plugin\Drivers folder contains two subfolders (amd64 and x86) with a few NIC .inf files. In the case that your computer has a NIC that is not available here, you will have to add the .inf files into a folder appropriate for your computer’s architecture.

WinPEtwo The third tab, Applications, lists all the applications and additional scripts that you can use with this WinPE. For example, you would first map a drive K: to a folder containing images (\\MyServer\Images) on the second tab, and then you would come here, click on the button named “DiskPart GUI Tool” to format computer’s hard drive in accordance with one of the Microsoft recommended disk partition structure, and finally, “Run ImageX GUI Tool” button and use GimageX tool and apply .wim image file located in the mapped folder. Microsoft ImageX utility is uploaded in the same folder (X:\Windows\System32\GimageX), and you can always start CMD and use this tool to either capture or apply .wim images.

WinPEthree

All applications used here are portable executables capable of running under both amd64 and x86 architecture. The DiskPart GUI Tool is a scripted utility, and the idea for this GUI tool I’ve found by reading about a utility to format disk, posted by Daniel Ratliff – http://www.potentengineer.com/powershell-osd-frontend-with-windows-forms/.

ACB_WinPE_DiskPart

The utility has two panes, on the left it displays physical disk and on the right lists the BIOS/UEFI partitions’ structure as recommended by Microsoft guides. To partition and format a disk on your computer, please first select partition option, then the physical disk and finally execute the action by clicking on “Format Disk” button. The DiskPart tool formats selected physical disk based on the content of the PowerShell here-string as shown in the example below.

ACB_WinPE_PartitionsStructure

What about HTA – WinPE 5.0

Some of you out there still like VBScript and HTA applications and choose HTA instead of PowerShell GUI apps. I have included both ACBWinPE.hta applications for both 32 bit and 64 bit systems.

This is the main page:

HTA_main

And this is the page where you launch most of the applications:

HTA_Apps

You have to discover the rest by yourself (it is included in the download file WinPE-Plugin.zip).

How to have this WinPE 5.0 GUI installed

  • You need to have Windows ADK 8.1 installed; download the Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update here: http://www.microsoft.com/en-us/download/details.aspx?id=39982.
  • Download WinPE-Plugin.zip package from the download section, under Application folder; this download has been divided into three portions/compressed files. You need to download all three files and do the following:

1) unzip the main folder: WinPE-Plugin (for example C:\WinPE-Plugin)
2) unzip the folder WinPE-Plugin_x64_PartTwo
3) find amd64 folder inside WinPE-Plugin_x64_PartTwo\Apps and copy/paste it into  C:\WinPE-Plugin\Apps folder
4) find amd64 folder inside WinPE-Plugin_x64_PartTwo\Drivers and copy/paste it into C:\WinPE-Plugin\Drivers folder
5) unzip the folder WinPE-Plugin_x32_PartThree
6) find x86 folder inside WinPE-Plugin_x32_PartThree\Apps and copy/paste it into C:\WinPE-Plugin\Apps folder
7) find x86 folder inside WinPE-Plugin_x32_PartThree\Drivers and copy/paste it into C:\WinPE-Plugin\Drivers folder

  • Run as administrator the PowerShell script named DualBoot-WinPE50.ps1; it creates under WinPE-Plugin folder four subfolders: Media, Mount, WinPE50_amd64 and WinPE50_x64. See the picture here: WinPE-PluginFolderAfter
  • Use my DiskPart application (you could find it in the download section) to build a bootable USB stick. It will format a USB drive and transfer all files from the following folder: C:\WinPE-Plugin\Media to the USB drive.

If you do not need to create a WinPE that dual boots (both 32 and 64 bit architecture), just edit the last lines in DualBoot-WinPE50.ps1 script and create either 32 bit WinPE bootable disk:32Bit

or a 64 bit WinPE bootable disk:64Bit

At the end, you can always expand this WinPE GUI with additional applications that you find useful in your environment. I do believe that ACB-WinPE.ps1 is a solid foundation that you can use to build upon. There are plenty of 32 bit portable applications that are not included here, but someone could find them very useful (apps like image viewer, virus scanner, etc.). Unfortunately we do not have that many 64 bit applications available for WinPE. If you find some that could be very useful to others, please post your comments here.




 

Please note: Although the author has made every reasonable attempt to achieve complete accuracy of the content, he assumes no responsibility for errors or omissions. Also, you should use this information as you see fit, and at your own risk.