Creating a Windows Pre-installation Environment (WinPE) Image
Before you begin
- Windows Assessment and Deployment Kit (Windows ADK) and Windows PE Add-on
- Network driver
- Configured unattend.xml file
About this task
This task provides instructions on creating a bootable Windows PE image.
Note: For Deployment Image Servicing and Management (DISM)
commands, use the architecture command for the target machines. For example, for
64-bit devices use amd64. Use arm for
devices with arm processors.
To create a WinPE
image:Procedure
-
Download and install the Windows Assessment and Deployment Kit (ADK) and ADK
add-on on the device(s) where you plan to create the WinPE image. See ADK download for details.
- Considerations before installing the ADK:
- You can use WinPE to deploy an earlier operating system.
- If you customize WinPE, make sure to use the WinPE optional components that match the version of WinPE you are customizing.
- Windows 11 is not available in a 32-bit architecture, so the
32-bit version of WinPE for Windows 11 is not supported. Note: Windows 10 supports the last 32-bit version of WinPE, which cannot deploy Windows 11.
- Deployment tools consideration:
- Newer versions of the deployment tools can be used on versions of Windows that are older than the ADK version you're using.
- Considerations for other tools:
- For the User State Migration Tool (USMT), WSIM, and the assessment kit, use the versions from the ADK that match the OS.
After you install the ADK and the WinPE add-on, Windows adds a developer tool named 'Deployment and Imaging Tools Environment' to the Start menu. - Considerations before installing the ADK:
-
Run the following command to create a copy of the WinPE files:
copype.cmd amd64 C:\winpe_amd64
-
Run the following command to mount the image:
dism.exe /mount-image /imagefile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:C:\winpe_amd64\mount
- Navigate to the mount folder, create a new folder named "OSI", and place the latest OSI utility (UTILITY.exe) file and the network driver inside it.
-
Add unattend.xml in the same "OSI" folder to create new
user and set up auto login. See Unattend.XML
example.
Note: Make sure the unattend.xml file has the following details:
- Username created after image deployment
- User password
- Auto-login functionality details
-
Configure the startnet.cmd to autorun the OSI utility.
Navigate to
C:\winpe_amd64\mount\Windows\System32\startnet.cmd and
replace the contents of startnet file with:
wpeinit timeout /t 20 /nobreak >nul X:\osi\Soti.MobiControl.OSI.Host.exe && exit
-
Run the following commands to add .NET packages to WinPE:
dism /Image:C:\WinPE_amd64\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
dism /Image:C:\WinPE_amd64\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
dism /Image:C:\WinPE_amd64\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab”
-
Run the following command to commit and unmount the WinPE image:
Dism /Unmount-Image /MountDir:"C:\WinPE_amd64\mount" /commit
Note: Make sure the WinPE is created at c:\winpe_amd64\media\sources\boot.wim, which is your WinPE image to mount on the Preboot Execution Environment (PXE) server. - Optional:
To use “Internal Media” bootable type mechanism in SOTI MobiControl, place the .sdi file, from
winpe_amd64\media\Boot, along with the
.wim file, in the same directory.
Note: The administrator must place the WinPE image on the client machines using packages or FileSync when using the Internal Disk Imaging mechanism. Enter this path in the “Bootable Media Path” field when selecting “Internal Disk” during the OS image creation and deployment process.
Example
Refer to the example unattend.xml file and make the necessary modifications.
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns='urn:schemas-microsoft-com:unattend' xmlns:wcm='http://schemas.microsoft.com/WMIConfig/2002/State' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<settings pass='oobeSystem'>
<component name='Microsoft-Windows-Shell-Setup' processorArchitecture='arm64' publicKeyToken='31bf3856ad364e35' language='neutral' versionScope='nonSxS'>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action='add'>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description>Local user account</Description>
<DisplayName></DisplayName>
<Group>Administrators</Group>
<Name></Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username></Username>
</AutoLogon>
</component>
</settings>
</unattend>