The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,706 other followers

Some commands and links from “Praktijk | Windows PE”; Softlink 1807114 – c’t magazine

Posted by jpluimers on 2019/02/04

Downloads: [WayBack] Softlink 1807114 – c’t magazine

Commands (only execute them from within a Windows PE session!):

  1. Sometimes the network does not start, so you can use the wpeutil command to start it: wpeutil initializenetwork; with wpeutil disablefirewall and wpeutil enablefirewall you can manage the firewall.Background information:
  2. 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.
    1. [WayBack] samba – Windows 10 PE Unable to map network drive anonymously – Server Fault
    2. [WayBack] WinPE Network Drivers: Initializing and adding drivers | Microsoft Docs
  3. 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 run drvload E:\driver\drivername.inf where E:\driver is where your driver files are.Background information:
  4. The manage-bde -unlock command can unlock a Bitlocker volume. There are various parameters, but the most used combination is manage-bde -unlock C: -password where C: is the drive you want to unlock and -password (or -pw) causes it to prompt for a password.Background information:
  5. To get information which kind of boot was performed (BIOS or UEFI):

    wpeutil updatebootinfo
    regedit

    Then browse toHKEY_LOCAL_MACHINE\System\CurrentControlSet\Control and check the value for PEFirmwareType: when 1, it is BIOS, when 2, it is UEFI.

    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 enabled
  • compact.exe /compactos:always enables compactOS

Windows PE:

  • Compact.exe /CompactOS:Query /WinDir:E:\Windows

Background information:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: