Hardware and software setup

Windows pe folder browsing not working. Dynamic Driver Loading in WinPE

Starting with this lecture, we will deal with issues regarding deployment aids, namely:

  1. Windows PE Preinstallation Environment.
  2. The utility for preparing an image for copying is Sysprep.
  3. The utility for capturing an image is ImageX.

Windows Preinstallation Environment (Windows PE) is the minimum functional version of the operating system. Windows systems xp, Windows Server 2003 and Windows Vista, with a limited set of services that allows you to boot your computer without installed Windows from a CD or over a network and is used to prepare a computer for installing Windows, copy disk images from a network file server, and initiate a Windows installation. The current version is 3.0.

Windows PE is not intended to be used as a primary operating system on the computer. It serves as an isolated preinstallation environment and is a built-in element of other installation and system recovery tools, such as Windows 7 Setup, Services Windows Deployment( WDS ) and environments Windows recovery(Windows RE).

Windows PE- the main thing Microsoft to boot computers without a working operating system, which may be a computer with a damaged system or with no system at all. Once the computer is booted into Windows PE, you can prepare it for installing Windows and run Windows Setup from a network or local location. Windows PE can be used as a feature-rich tool that allows you to maintain your existing a copy of Windows or recover data.

Because Windows PE is based on Windows kernel 7, it has the following features:

  • Built-in support file system NTFS 5.x, including dynamic volume creation and management.
  • Built-in support for TCP/IP networks and file sharing. This opportunity is only feasible for the client, so it is not possible to create a full-fledged server based on the preinstallation environment.
  • Native support for 32-bit (or 64-bit) device drivers for Windows, depending on the bitness of the preinstallation environment.
  • Built-in support for a subset of the API.
  • Additional support for WMI, MDAC, and HTML applications.
  • Ability to run from various types media, including CDs, DVDs, USB flash drives (UFDs), and Remote Installation Service (WDS) servers.
  • Offline Windows PE sessions are supported.
  • Windows PE images can be served offline.
  • Windows PE includes all Hyper-V drivers except for the monitor drivers. This allows you to run Windows PE in a hypervisor. Supported features include support for mass storage devices, mice, and network adapters.

Purpose of Windows PE

  • Installing Windows 7. Windows PE starts every time you install Windows 7. Graphic tools that collect configuration information during installation run in Windows PE. In addition, departments information technologies can customize and expand Windows features PEs according to their system deployment requirements. Windows PE also supports serving Windows images. You can add a variety of applications to the PE image that allow you to perform various actions on your computer before you begin installing the operating system.
  • Troubleshooting. Windows PE can be used for automatic or manual troubleshooting. For example, if Windows 7 does not start because a system file is corrupted, Windows PE may automatically start and load the Windows Recovery Environment (Windows RE). You can also start Windows PE manually to use built-in or custom diagnostic and troubleshooting tools. Preinstallation Environment is used in some third-party tools that allow you to service broken copies of the operating system.
  • Recovery. WITH Windows PE Original Equipment Manufacturers (OEMs) and Independent Suppliers software can create custom, automated solutions to recover and rebuild computers running Windows 7. For example, users can start their computers from a Windows PE CD to restore the system, or from recovery partitions to automatically reformat hard drives and reinstall operating system Windows theme 7 with original drivers, settings and applications.

Windows PE limitation

Windows PE is a stripped-down Windows version 7 and has the following limitations.

  • To minimize the size of Windows PE, only a limited set of Win32 programming interfaces are included. This set includes the I/O interface (for disk and network) and the main Win32 interfaces.
  • Because the Preinstallation Environment is distributed free of charge to prevent pirated use of Windows PE as an operating system, after 72 hours of continuous use, the shell will automatically terminate and restart. The value of this time period cannot be changed.
  • Windows PE cannot be used as a file server or terminal server because Remote Desktop is not supported.
  • DFS name resolution is only supported for isolated root directories. Domain roots are not supported. Standalone DFS roots allow the use of a DFS root that exists only on local computer and therefore not using Active Directory.
  • Methods for connecting to file servers via TCP/IP and NetBIOS over TCP/IP are supported. Other methods like network protocol IPX/SPX are not supported.
  • All changes in Windows registry PE while it is running will be lost the next time you restart your computer. Permanent changes to the registry can only be made in offline before starting Windows PE.
  • Drive letters are assigned sequentially as partitions are created in Windows PE. However, when restart Windows PE all assigned drive letters are reverted to the default order.
  • Windows PE does not support the Microsoft .NET wrapper or CLR.
  • Windows PE does not include Windows on Windows 32 (WOW32), Windows on Windows 64 (WOW64), virtual machine DOS (VDM), OS/2 and POSIX.
  • Windows PE can be used to set up and partition your computer's drives before Windows Setup starts. If any hard drives are converted to dynamic disks using the Diskpart.exe program before running Windows Setup, they are then recognized as external during the operating system installation process and all volumes on these hard drives will be inaccessible.
  • Windows PE does not support applications that are archived Windows installer(.MSI file).
  • Windows PE does not support 802.1x.
  • Windows PE does not support loading from a destination that contains non-English characters.

Windows PE dependencies

Windows PE is dependent on a number of Windows technologies to function.

  • At using Windows PE on the network DHCP servers and DNS can be helpful, although not required.
  • For Windows boot A PE from the network needs a Windows Deployment Services server.
  • To install Windows, you must run Windows Setup (Setup.exe for Windows 7 or Winnt32.exe for Windows Server 2003).
  • When automating a Windows 7 installation, you must use the Unattend .xml answer file.

Windows PE boot process

  • Loading using boot sector specific carrier. Control is transferred to the Bootmgr program. Bootmgr extracts basic boot information from the boot configuration data and passes control to the Winload.exe program contained in Boot.wim. Winload.exe then loads the required hardware dependent layer ( HAL ) and loads the hive system registry and necessary drivers downloads. After the download is complete, it prepares the environment for executing the Ntoskrnl.exe core. At Windows startup PE from read-only media such as a CD, Windows PE keeps the registry hives in memory, allowing applications to write to the registry. Any changes made to the registry by applications are not saved for use in other Windows PE sessions.
  • The Ntoskrnl.exe program is executed and completes the installation of the environment. Control is transferred to the Session Manager (SMSS) module.
  • The SMSS module loads the rest of the registry, sets up the environment to run the Win32 subsystem (Win32k.sys file) and its various processes. The SMSS module loads the Winlogon process to create a user session and then starts the services, other minor device drivers, and the security subsystem (LSASS).
  • Winlogon.exe installs based on registry value HKLM\SYSTEM\Setup\CmdLine. Winpeshl.exe will run %SYSTEMDRIVE%\sources\setup.exe if this file exists, in otherwise Winpeshl.exe will look for the application specified in the file %SYSTEMROOT%\system32\winpeshl.ini. If application is not specified, the command will be executed cmd /k %SYSTEMROOT%\system32\startnet.cmd. By default, Windows PE contains the Startnet.cmd file, which starts the Wpeinit.exe program. Wpeinit.exe downloads network resources and coordinates with networking components such as DHCP.
  • After executing Wpeinit.exe, a window will appear command line. This indicates the completion of the Windows PE boot process.

This documentation has been archived and is no longer maintained.

Windows Preinstallation Environment (WinPE)

Windows Preinstallation Environment (WinPE) for Windows 10 is a small operating system that is used to install, deploy, and restore classic editions of Windows 10 (Home, Pro, Enterprise, and Windows 10). educational institutions), Windows Server 2016 Technical Preview, and other Windows operating systems. In Windows PE, you can:

  • tune HDD before installing Windows;
  • install Windows using applications or scripts over the network or from a local drive;
  • capture and apply Windows images;
  • change the Windows operating system when it is not running;
  • configure automatic recovery tools;
  • recover data from devices that cannot boot.
  • add your own shell or your GUI to automate such tasks.

Where can I download this environment?

To get Windows PE, use the installer that is included with the Windows Assessment and Deployment Kit (Windows ADK). additional information see , and Demo: Install Windows PE on a USB flash drive.

Support for many Windows components

Windows PE launches a command environment Windows strings and supports the following Windows components:

  • Batch files and scripts, including support for Windows Script Host (WSH) and ActiveX Data Objects (ADO), as well as additional support for PowerShell.
  • Applications, including Win32 programming interfaces (APIs) and additional support for HTML Applications (HTAs).
  • Drivers, including common set drivers that manage network, graphics, and storage devices.
  • Capturing and maintaining images, including Deployment Image Servicing and Management (DISM).
  • Net, including connecting to file servers using TCP/IP and NetBIOS over TCP/IP on the local network.
  • Data storage, including NTFS, DiskPart and BCDBoot.
  • Security Tools, including additional support for BitLocker and Trusted Platform Module (TPM), Secure Boot, and more.
  • Hyper-V, including VHD files, mouse integration, mass storage drivers, and network drivers, allowing Windows PE to run in a hypervisor.

equipment requirements

Windows PE preinstallation environment requirements are similar Windows requirements with some exceptions:

  • No hard drive required. You can start Windows PE completely from random access memory.
  • For the basic version, only 512 MB of RAM is enough. (You will need more memory when adding drivers, packages, or applications.)
  • To boot Windows PE directly from RAM (also known as ramdisk boot), a contiguous area of ​​physical memory (RAM) must be available that can hold the entire Windows PE image (WIM). To optimize memory usage, manufacturers should ensure that their firmware reserves memory areas either at the beginning or at the end of the physical memory address space.

The 32-bit version of Windows PE can boot 32-bit computers with UEFI and BIOS, and 64-bit computers with BIOS.

The 64-bit version of Windows PE can boot 64-bit UEFI and BIOS computers.

Restrictions

Windows PE is not a general purpose operating system. It can only be used for deployment and recovery. The medium cannot be used as thin client or embedded operating system. You can use other Microsoft products to do this, such as Windows Embedded CE.

To prevent it from being used as the primary operating system, Windows PE automatically stops the shell and reboots after 72 hours of continuous operation. This interval cannot be configured.

Restarting Windows PE loses all changes, including changes to drivers, drive letters, and the Windows PE registry. To make permanent changes, see the section.

When installing Windows PE, the default format is FAT32, which imposes its own limitations: file sizes are limited to 4 GB, and disk size is limited to 32 GB. See the section for more information.

Windows PE does not support:

  • using a file server or terminal server;
  • joining a network domain;
  • connecting to an IPv4 network from Windows PE on an IPv6 network;
  • remote Desktop;
  • installation MSI files;
  • loading from a path that contains characters that are not in the English alphabet;
  • running 64-bit applications on 32-bit Windows PE;
  • adding app bundle packages using DISM (bundles.appxbundle).

Note In general, to deploy Windows, you should use latest version WinPE. If you are using a custom WinPE for Windows 10 images, you may prefer to continue using the existing one. Windows image PE and run the latest version of DISM from a network location. See the section for more information.

Notes about running Windows Setup in Windows PE.

  • You can use 32-bit versions of Windows PE and Windows Setup to install 64-bit versions of Windows. See the section for more information.
  • While Windows PE supports dynamic disks, Windows Setup does not. If you install Windows on a dynamic disk created in Windows PE, dynamic disks will not be available in Windows.
  • For correct installation Windows on UEFI-based computers that support both UEFI and legacy BIOS versions, it is important to download Windows PE to desired mode. See the section for more information.

see also

Type of contentLinks

Product rating

Deployment

WinPE (Windows Preinstallation Environment) is a stripped-down version of the Windows operating system. Main difference WindowsPE from standard Windows is that it can be loaded from removable media (CD, DVD, USB). Those. if you have a disk with WinPE, you can start the computer and restore performance existing system if it is damaged.

Booting from WinPE we get full access to computer hard drives (including NTFS volumes, registry, settings and drivers), therefore, we can replace damaged system files original or, for example, perform some operations with disk partitions.

There are both official versions of WindowsPE from Microsoft and various builds. The first official version (Windows PE 1.0) was built on Windows based XP, and the latest at the time of this writing (Windows PE 4.0) is based on Windows 8.

WinPE from Microsoft have a decent weight, but little functionality. Therefore, among users, the so-called assemblies - sets of programs running in the WindowsPE environment. Perhaps the most famous such assembly is the emergency recovery disk. ERD Commander. It was originally developed by Winternals Software, but in 2006 the company was acquired by Microsoft and since then ERD Commander has become part of the suite. software tools Microsoft Desktop Optimization Pack.

ERD Commander has a wide range of tools with which you can troubleshoot serious problems with your system, change forgotten password administrator, restore deleted files etc. You can read more about ERD Commander in.

With the release of Windows 8, the Windows PE Preinstallation Environment has also been updated. The advent of Windows 8.1 was accompanied by PE 5.0, and Windows 8.1 Update corresponds to PE 5.1. Windows PE is included in the Windows ADK, which now integrates deployment and evaluation tools for various system settings.

What's in the Windows ADK

Previously, tools for preparing the operating system for deployment and evaluating its performance were supplied in separate kits. Now Windows Assessment and Development Kit(hereinafter referred to as ADK) has merged several packages.

Deployment and Imaging Tools and Windows Preinstallation Environment

These funds for Windows preparation to deployment were previously part of the WAIK, and the Windows System Image Manager hasn't even changed in appearance.

Windows Performance Toolkit

Assessment Toolkit Windows performance, which you are already familiar with, used to come in the SDK. WPT now includes new tools for recording various application and system scenarios (Windows Performance Recorder) and viewing records (Windows Performance Analyzer).

The console is convenient in that it already includes various tests, and they are combined into groups for a comprehensive assessment.

Download and install the Windows ADK

Microsoft does not offer an ISO download, but with the help of an installer you can download the complete kit (instructions in English) and make an image out of it if necessary. Once installed, you will find all kits in the Program Files\Windows Kits folder. However, if you have a 64-bit system, only part of the deployment tools will fall there, and the rest will end up in Program files (x86).

Further on in the program:

What's new in Windows PE

A complete list of changes in different versions of PE can be found on this TechNet library page. For example, Windows 8 Preinstallation Environment is based on Windows PE 4.0, which has a number of significant changes from Windows PE 3.1. So, the list of packages that can be implemented in PE has expanded, in particular, the following has been added:

  • .NET (WinPE-NetFX) enables applications that require the .NET Framework to run.
  • Powershell (WinPE-PowerShell) allows you to use PowerShell in a PE environment. The ADK includes a new version Powershell.
  • DISM PowerShell Cmdlets (WinPE-DismCmdlets) are new cmdlets in the third version of Powershell for creating and serving WIM images
  • Remote Network Driver Specification (WinPE-RNDIS) useful for accessing remote clients from Windows PE
  • Windows PE Secure Startup (WinPE-SecureStartup) needed to manage BitLocker and TPM.

Changes in Windows PE 5.0 and 5.1 are not as significant. But if 5.0 was included in the ADK, then 5.1, which adds support for WimBoot , at the moment latest update This article should be applied as an update to 5.0.

Preparing a working folder

Enter in search media environment(in the English version - deployment) and run the Deployment Tools Command Prompt as an administrator. Basically this is a file. DandISetEnv.bat from a folder Deployment and Imaging Tools A that sets the required environment variables for quick access to command line tools.

To work with autoinstallation and Windows PE, I have long created an environment variable %ua%, leading to a folder unattend at the root of the profile. You can create the same variable permanently, or only within the current command line session, as shown below.

:: Set the path to the working folder (avoid Cyrillic and spaces in the path) set ua=C:\unattend:: Create a folder md %ua%

# Set the path to the working folder (avoid Cyrillic and spaces in the path) $env:ua = "C:\unattend" # Create the md folder $env:ua

All further commands will use the %ua% variable, regardless of where your working folder is created.

Copying Windows PE Files to a Working Folder

The ADK includes a handy file copype.cmd, which does the job in one command.

Note that using DISM from a 32-bit PE, you can serve Windows any bit depth, and from 64-bit PE - only 64-bit . All of my commands assume the creation of a 32-bit Windows PE environment. To prepare a 64-bit disk, replace everywhere x86 on the amd64.

On the command line, run:

Cd "..\Windows Preinstallation Environment" copype.cmd x86 %ua%\winpe_x86\

The first command goes to the set folder Windows files PE, and the second one runs the file copype.cmd with parameters x86 to create a 32-bit PE and %ua%\winpe_x86\ to copy the necessary files to this folder, which we will work with next.

Working with a Windows PE WIM image

All actions must be performed in the Deployment Tools command line, which you launched with full rights in the previous step.

Step 1 - Mounting the Image

Mounting a WIM image is performed with a single command using the DISM utility. If you frequently work with WIM images, it doesn't hurt to clear out any previous connections first.

Dism /Cleanup-Wim dism /Mount-Wim /WimFile:%ua%\winpe_x86\media\sources\boot.wim /index:1 /MountDir:%ua%\winpe_x86\mount

Step 2 - Adding Packages to the Image

The packages are in the folder WinPE_OCs, and we'll add four packages:

  • .net framework
  • PowerShell
  • DISM cmdlets

The first command goes into a folder, and the second one adds packages:

Cd x86\WinPE_OCs dism /image:%ua%\winpe_x86\mount /Add-Package /PackagePath:WinPE-NetFx.cab /PackagePath:WinPE-PowerShell.cab /PackagePath:WinPE-DismCmdlets.cab /PackagePath:WinPE-wmi. cab

The ability to list multiple packages at once in one command speeds things up.

You can add any other packages from the WinPE_OCs folder. For instance, WinPE-Scripting.cab will enable Windows Script Host (WSH) scripting. But be aware that each package increases the size of the Windows PE image.

Important! PowerShell requires the .NET Framework, so you need to add the package first WinPE-NetFx4.cab, and only after him WinPE-PowerShell3.cab and WinPE-DismCmdlets.cab.

Since adding packages is akin to installing software, importing WinPE-PowerShell3.cab without the .NET package, an error will occur 0x800f081e. When I created my first disc, I added the packages in the correct order. But then he accidentally changed it when he collected all the packages in one command. To solve the problem, I had to dance with a tambourine (in the truest sense of the word :)

You can check the presence of packages in the image with the command:

Dism /image:%ua%\winpe_x86\mount /Get-Packages

Step 3 - Adding Drivers

This step is optional because Windows PE contains basic set drivers, including network cards. You may need access to the network, for example, to save the captured WIM image to a network drive.

If necessary, using DISM you can add:

  • a separate driver by specifying the path to the INF file
  • all drivers from the folder, specifying the path to it and the /recurse key

Examples of these commands:

dism /Image:%ua%\winpe_x86\mount /Add-Driver /Driver:C:\drivers\mydriver.INF dism /Image:%ua%\winpe_x86\mount /Add-Driver /Driver:C:\drivers /recurse

Step 4 - Adding Your Utilities and Scripts

I have a folder Tools where various command-line utilities and tools are stored. I always include it with Windows PE by adding it to the root of the drive.

Xcopy /e /y "%userprofile%\PortableSoft\Tools" %ua%\winpe_x86\media\Tools\

Alternatively, you can copy the utilities directly to the folder System32 image. Then they can be launched without going to the folder Tools or without specifying the full path. I, however, prefer to separate the flies from the cutlets.

You can see that the .NET Framework has been successfully added as the list of DISM cmdlets in PowerShell 3 is displayed. I'll show you soon how to use them to work with WIM images from Windows PE.

In order not to waste time in vain, for now you can read Interesting Facts and helpful tips about Windows PE, as well as experiment with launching applications and replacing the command line interface with your favorite file manager.

Do you use Windows PE or other homemade discs? Tell us in the comments which disks you use for system maintenance and recovery!

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!