Downloads: [WayBack] Softlink 1807114 – c’t magazine
Commands (only execute them from within a Windows PE session!):
- Sometimes the network does not start, so you can use the
wpeutil
command to start it:wpeutil initializenetwork
; withwpeutil disablefirewall
andwpeutil enablefirewall
you can manage the firewall.Background information: - Like regular Windows,
net use
can map shares to drive letters over a wired network connection. There is a small thing with anonymous logon, see the below links for more, and you might need a network driver that is not automatically loaded, see the next section. - Windows PE can load most drivers through the drvload command; ensure you have unpacked your drivers and the driver directory contains the appropriate
.inf
file, then rundrvload E:\driver\drivername.inf
whereE:\driver
is where your driver files are.Background information:- [WayBack] Windows 10 Command Line Driver Install | Dell US
- [WayBack] Load only the WinPE network driver(s) you need using DRVLOAD – codeshop99
- [WayBack] How To Test Drivers Compatibility Within Winpe | Ivanti User Community which can result into two kinds of messages:
DrvLoad: Unable to load X:\InstalledDrivers\...\e1d6432.inf (Error 0x80070002)
DrvLoad: Successfully loaded C:\e1c6432.inf
- [WayBack] Drvload Command-Line Options | Microsoft Docs
- The
manage-bde -unlock
command can unlock a Bitlocker volume. There are various parameters, but the most used combination ismanage-bde -unlock C: -password
whereC:
is the drive you want to unlock and-password
(or-pw
) causes it to prompt for a password.Background information: - To get information which kind of boot was performed (BIOS or UEFI):
wpeutil updatebootinfo
regeditThen browse to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control
and check the value forPEFirmwareType
: when1
, it isBIOS
, when2
, it isUEFI
.or check out
[WayBack] Boot to UEFI Mode or Legacy BIOS mode | Microsoft Docs and run this small script:
wpeutil UpdateBootInfo for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
:: Note: delims is a TAB followed by a space.
if %Firmware%==0x1 echo The PC is booted in BIOS mode.
if %Firmware%==0x2 echo The PC is booted in UEFI mode.
You can execute compact.exe
with the /compactos
parameter from both a regular Windows installation as well as from Windows PE. From Windows PE, you need to provide an extra parameter: the drive to check.
Regular Windows:
compact.exe /compactos
queries if it is enabledcompact.exe /compactos:always
enables compactOS
Windows PE:
Compact.exe /CompactOS:Query /WinDir:E:\Windows
Background information:
- [WayBack] Compact OS, single-instancing, and image optimization | Microsoft Docs
- [WayBack] Windows Setup Command-Line Options | Microsoft Docs
- [WayBack] Sample scripts | Microsoft Docs
–jeroen