Templates by BIGtheme NET
Home / Visual Basic.Net / Add framework winPE Windows Preinstallation Environment
Add framework winPE Windows Preinstallation Environment
Add framework winPE Windows Preinstallation Environment

Add framework winPE Windows Preinstallation Environment

Add framework  winPE Windows Preinstallation Environment boot.wim is a tricky task. To Create WinPE boot image with .NET Framework is explained step by step. Microsoft did not include any version of framework in winPE. There may be some reasons which cause to exclude dot net framework from Windows Preinstallation Environment. So .net framework 4 Running VB.NET on Windows PE is not included.  You even cannot run Visual Basic 6 application in this environment. I tried different languages such as Dev shed C++, Delphi, VB6, HTA etc but none of them worked for me. I also discussed with Microsoft MSDN help to run Visual Basic .net Add framework  winPE but did not find useful help.

Understanding with dot Net framework

Microsoft released a serial of framework for different languages in Visual Studio. The serial is started from 1 to almost 4.6 framework is available to download. The serial of dot net framework does not depend on each other. If your PC has 4.0 framework installed, it doesn’t mean you can use the libraries of dot net framework 3.0 or 3.5. You have to install each framework separately to use the functionality of the required framework.

Add framework in winPE (Windows Preinstallation Environment)

Pre requirements

  • Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update
  • Microsoft Visual Studio minimum 2010 for .net framework 4.0
  • Power ISO for DISM Tool
  • VMware Workstation for testing purpose
  • Winpeshl.ini file for application startup

In this tutorial we are going to add .net framework 4 in winPE. It will also help you to make a Windows PE Rescue Disc, add packages to Windows PE, add programs to windows pe, add wmi to winpe, add imagex to winpe windows 10 Windows ADK 8.1. It can also use in Windows 10 and all such purposes which are required in Windows 10. I used Windows ADK 8.1 in Windows 10 x64 which worked for me.

Add framework  winPE

First of all, download Windows ADK 8.1 and select the features,” Deployment Tools” and “Windows Preinstallation Environment (Windows PE)” to install it. It will install online, so time is required to complete this process.

Add framework winPE Windows Preinstallation Environment

Add framework winPE Windows Preinstallation Environment

2nd step is to download Microsoft Visual Studio 2015 and install it to compile an application with framework 4.0. Microsoft Visual Studio 2010 to onward all Visual Studio supports dot net framework 4.0. you can use anyone. If you already have an application with dot net framework 4.0, then you can skip this step. You may download dot net framework 4.0 compiled application for testing purpose.

3rd step is download Power ISO  to add framework 4.0 compiled application in boot.wim file. This tool is easy to mount, unmount and commit the boot.wim.

4th step is to download VMware Workstation for testing purpose. After creating custom iso included dot net framework 4.0, we will run the iso to find out results.

5th step is we required Winpeshl.ini file for application startup, download Winpeshl.ini

Now I am assuming that you have completed all above five steps and ready for building winPE with dot net framework 4.0. This example worked with Windows ADK 8.1 and Windows 8.1 or 10 64bit version. Copy and paste the following code into Notepad and save it as yourname.cmd and run as administrator. You can also perform this step to run each command step by step.

@echo off
md C:\WinPE_x64
echo copy winpe.wim to WinPE_x64 folder
copy "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim" C:\WinPE_x64\winpe.wim
md C:\Mount
echo Mounting winpe.wim to mount folder
cd /d "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM"
Imagex /mountrw C:\WinPE_x64\winpe.wim 1 C:\Mount
echo Injecting .NetFramework 4 packages...
cd /d "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs>"
dism /image:C:\Mount /add-package /packagepath:"WinPE-WMI.cab"
cd en-us
dism /image:C:\Mount /add-package /packagepath:"WinPE-WMI_en-us.cab"
cd ..
dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFX.cab"
cd en-us
dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFx_en-us.cab"
cd /d "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM"
echo Committing winpe.wim ...
Imagex /unmount /commit C:\Mount

After running this code, winpe.wim file will inject with Add framework  winPE, next step is to create and ISO of winpe.wim file for boot.

Copy and paste the following code into Notepad and save it as yourname.cmd and run as administrator. Copy and paste the following code into Notepad and save it as yourname.cmd and run as administrator. You can also perform this step to run each command step by step.

@echo off
md C:\WinPE_x64\ISO\
xcopy /s "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\Media" "C:\WinPE_x64\ISO"/y
md C:\WinPE_x64\ISO\Sources\
copy C:\WinPE_x64\winpe.wim C:\WinPE_x64\ISO\Sources\winpe.wim
rename C:\WinPE_x64\ISO\Sources\winpe.wim boot.wim
copy "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\etfsboot.com" C:\WinPE_x64\
cd /d C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg
echo making iso C:\WinPE_X64\WinPE_X64.iso
oscdimg -b"c:\WinPE_X64\etfsboot.com" -n C:\WinPE_X64\ISO C:\WinPE_X64\WinPE_X64.iso

after run above code, you will see at C:\WinPE_X64\ISO C:\WinPE_X64\ there is WinPE_X64.iso file which now ready with Add framework  winPE

Now next step is to add dot net framework compiled application and Winpeshl.ini. So open Winpeshl.ini in Notepad and change the name of application and save it, which you want to run in winPE. Open WinPE_X64.iso file with PowerISO and browse to Sources folder. From Source folder copy boot.wim file to an empty folder. Open boot.wim file with PowerISO and choose command DISM tool from Tool menu. In DISM tool click on mount and browse to early copy boot.wim file from image file. Create a folder and Browse mount path to the created folder. Click on mount button. It will take some time to mount boot.wim file. The contents of boot.wim file will extract in the selected folder. After completing the process, click on OK button. Now you will the selected folder has extracted files, now copy and paste dot net framework application and Winpeshl.ini to windows\system32\ folder. You can paste file according to your fit needs. Now verify all files are copied and pasted successfully. After adding all files, click on Unmount button from PowerISO. Very carefully click on “Commit – Save the changes when unmounting image file” check box. Next again click on Unmount button. It will again take some time to save you made changes. After successful operation, the folder will empty, and all files and folders will again save in boot.wim file.

Now copy save the new created boot.wim file in WinPE_X64.iso using PowerISO. You can simply delete the already boot.wim in the open ISO and drag and drop the new created boot.wim file, next click on save button to apply the changes.

Now it time to test our WinPE_X64.iso file, now open VMware Workstation and boot it from WinPE_X64.iso. So, hope you will see the application compiled in dot net framework 4 is running in winPE.

This method Add framework  winPE works for both UEFI boot and MBR Boot.

About Windows Tips

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*